Skip to content

Commit

Permalink
base for v0.27.1
Browse files Browse the repository at this point in the history
  • Loading branch information
miralandlabs committed Dec 13, 2023
1 parent c4ac449 commit 5014529
Show file tree
Hide file tree
Showing 77 changed files with 2,419 additions and 1,501 deletions.
28 changes: 28 additions & 0 deletions .github/actions/setup-miraland/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Setup Miraland"
description: "Setup Miraland"
runs:
using: "composite"
steps:
- uses: actions/cache@v3
name: Cache Miraland Tool Suite
id: cache-miraland
with:
path: |
~/.cache/miraland/
~/.local/share/miraland/
key: miraland-${{ runner.os }}-v0000-${{ env.MIRALAND_CLI_VERSION }}
- uses: nick-fields/retry@v2
if: steps.cache-miraland.outputs.cache-hit != 'true'
with:
retry_wait_seconds: 300
timeout_minutes: 2
max_attempts: 10
retry_on: error
shell: bash
command: sh -c "$(curl -sSfL https://release.miraland.top/v${{ env.MIRALAND_CLI_VERSION }}/install)"
- run: echo "/home/runner/.local/share/miraland/install/active_release/bin" >> $GITHUB_PATH
shell: bash
- run: miraland-keygen new --no-bip39-passphrase
shell: bash
- run: miraland config set --url localhost
shell: bash
28 changes: 0 additions & 28 deletions .github/actions/setup-solana/action.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/actions/setup-ts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ runs:
with:
path: |
./ts/node_modules/
key: solana-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./ts/**/yarn.lock') }}
key: miraland-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./ts/**/yarn.lock') }}
- uses: actions/cache@v3
name: Cache Typescript Dist
id: cache-typescript-dist
with:
path: |
./ts/dist/
key: solana-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./ts/**/*.ts') }}
key: miraland-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./ts/**/*.ts') }}
- run: cd ts/packages/borsh && yarn --frozen-lockfile && yarn build && cd ../../../
shell: bash
- run: cd ts/packages/anchor && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/no-caching-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: No Caching Tests
on:
push:
branches:
- master
- main

jobs:
no-caching-tests:
name: Reusable
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: false
solana_cli_version: 1.14.16
miraland_cli_version: 1.18.0
node_version: 17.0.1
cargo_profile: release
anchor_binary_name: anchor-binary-no-caching
56 changes: 28 additions & 28 deletions .github/workflows/reusable-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
cache:
required: true
type: boolean
solana_cli_version:
miraland_cli_version:
required: true
type: string
node_version:
Expand All @@ -20,7 +20,7 @@ on:
type: string
env:
CACHE: inputs.cache
SOLANA_CLI_VERSION: ${{ inputs.solana_cli_version }}
MIRALAND_CLI_VERSION: ${{ inputs.miraland_cli_version }}
NODE_VERSION: ${{ inputs.node_version }}
CARGO_PROFILE: ${{ inputs.cargo_profile }}
ANCHOR_BINARY_NAME: ${{ inputs.anchor_binary_name }}
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- run: chmod +rwx ~/.cargo/bin/anchor

- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-solana/
- uses: ./.github/actions/setup-miraland/
- uses: ./.github/actions/setup-ts/

- uses: actions/cache@v3
Expand All @@ -117,39 +117,39 @@ jobs:
id: cache-basic-0
with:
path: ./examples/tutorial/basic-0/target
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-0/**/Cargo.toml') }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-0/**/Cargo.toml') }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
name: basic-1 cache
id: cache-basic-1
with:
path: ./examples/tutorial/basic-1/target
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-1/**/Cargo.toml') }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-1/**/Cargo.toml') }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
name: basic-2 cache
id: cache-basic-2
with:
path: ./examples/tutorial/basic-2/target
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-2/**/Cargo.toml') }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-2/**/Cargo.toml') }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
name: basic-3 cache
id: cache-basic-3
with:
path: ./examples/tutorial/basic-3/target
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-3/**/Cargo.toml') }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-3/**/Cargo.toml') }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
name: basic-4 cache
id: cache-basic-4
with:
path: ./examples/tutorial/basic-4/target
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-4/**/Cargo.toml') }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ runner.os }}-${{ hashFiles('./examples/tutorial/basic-4/**/Cargo.toml') }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- run: cd examples/tutorial && yarn workspaces run test
- uses: ./.github/actions/git-diff/
Expand All @@ -176,7 +176,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-solana/
- uses: ./.github/actions/setup-miraland/

- uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -233,8 +233,8 @@ jobs:
id: cache-test-target
with:
path: client/example/target
key: cargo-${{ runner.os }}-client/example-${{ env.ANCHOR_VERSION }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
- uses: ./.github/actions/setup-solana/
key: cargo-${{ runner.os }}-client/example-${{ env.ANCHOR_VERSION }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
- uses: ./.github/actions/setup-miraland/
- run: cd client/example && ./run-test.sh
- uses: ./.github/actions/git-diff/

Expand All @@ -247,7 +247,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-ts/
- uses: ./.github/actions/setup-solana/
- uses: ./.github/actions/setup-miraland/

- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
Expand All @@ -269,14 +269,14 @@ jobs:
id: cache-test-target
with:
path: tests/bpf-upgradeable-state/target
key: cargo-${{ runner.os }}-tests/bpf-upgradeable-state-${{ env.ANCHOR_VERSION }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ runner.os }}-tests/bpf-upgradeable-state-${{ env.ANCHOR_VERSION }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- run: solana-test-validator -r --quiet &
- run: miraland-test-validator -r --quiet &
name: start validator
- run: cd tests/bpf-upgradeable-state && yarn --frozen-lockfile
- run: cd tests/bpf-upgradeable-state
- run: cd tests/bpf-upgradeable-state && anchor build --skip-lint
- run: cd tests/bpf-upgradeable-state && solana program deploy --program-id program_with_different_programdata.json target/deploy/bpf_upgradeable_state.so
- run: cd tests/bpf-upgradeable-state && miraland program deploy --program-id program_with_different_programdata.json target/deploy/bpf_upgradeable_state.so
- run: cd tests/bpf-upgradeable-state && cp bpf_upgradeable_state-keypair.json target/deploy/bpf_upgradeable_state-keypair.json && anchor test --skip-local-validator --skip-build --skip-lint
- run: cd tests/bpf-upgradeable-state && npx tsc --noEmit
- uses: ./.github/actions/git-diff/
Expand All @@ -285,7 +285,7 @@ jobs:
# # checks rent correctly for legacy accounts
# # that don't have to be rent-exempt
# test-misc-non-rent-exempt:
# # the anchor cli is built with a different solana version
# # the anchor cli is built with a different miraland version
# # but that's fine since it's just the cli
# needs: setup-anchor-cli
# name: Test tests/misc/nonRentExempt
Expand All @@ -296,23 +296,23 @@ jobs:
# - uses: ./.github/actions/setup/
# - uses: ./.github/actions/setup-ts/
# - uses: actions/cache@v3
# name: Cache Solana Tool Suite
# id: cache-solana
# name: Cache Miraland Tool Suite
# id: cache-miraland
# with:
# path: |
# ~/.cache/solana/
# ~/.local/share/solana/
# key: solana-${{ runner.os }}-v0000-1.8.14
# ~/.cache/miraland/
# ~/.local/share/miraland/
# key: miraland-${{ runner.os }}-v0000-1.8.14
# # using an outdated validator but that
# # is ok as long as the test doesn't
# # include newer incompatible features
# - run: sh -c "$(curl -sSfL https://release.solana.com/v1.8.14/install)"
# - run: sh -c "$(curl -sSfL https://release.miraland.top/v1.8.14/install)"
# shell: bash
# - run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
# - run: echo "/home/runner/.local/share/miraland/install/active_release/bin" >> $GITHUB_PATH
# shell: bash
# - run: solana-keygen new --no-bip39-passphrase
# - run: miraland-keygen new --no-bip39-passphrase
# shell: bash
# - run: solana config set --url localhost
# - run: miraland config set --url localhost
# shell: bash
# - uses: actions/download-artifact@v3
# with:
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-ts/
- uses: ./.github/actions/setup-solana/
- uses: ./.github/actions/setup-miraland/

- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
Expand Down Expand Up @@ -439,7 +439,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup/
- uses: ./.github/actions/setup-ts/
- uses: ./.github/actions/setup-solana/
- uses: ./.github/actions/setup-miraland/

- uses: actions/cache@v3
if: ${{ env.CACHE != 'false' }}
Expand All @@ -461,7 +461,7 @@ jobs:
id: cache-test-target
with:
path: ${{ matrix.node.path }}/target
key: cargo-${{ runner.os }}-${{ matrix.node.path }}-${{ env.ANCHOR_VERSION }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ runner.os }}-${{ matrix.node.path }}-${{ env.ANCHOR_VERSION }}-${{ env.MIRALAND_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- run: ${{ matrix.node.cmd }}
name: ${{ matrix.node.path }} program test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: Tests
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
tests:
name: Reusable
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: true
solana_cli_version: 1.14.16
miraland_cli_version: 1.18.0
node_version: 17.0.1
cargo_profile: debug
anchor_binary_name: anchor-binary
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- cli: Failing commands will return the correct exit status. ([#2370](https://github.com/coral-xyz/anchor/pull/2370)).
- idl: Update the IDL program to use non-deprecated account types ([#2365](https://github.com/coral-xyz/anchor/pull/2365)).
- ts: Enum fields weren't being converted from snake_case to camelCase ([#2378](https://github.com/coral-xyz/anchor/pull/2378)).
- lang/cli: Update to solana-program version 1.14.16 and rust version 1.60, appears to still be incompatible with 1.15 CLI ([#2420](https://github.com/coral-xyz/anchor/pull/2420)).
- lang/cli: Update to solana-program version 1.18.0 and rust version 1.60, appears to still be incompatible with 1.15 CLI ([#2420](https://github.com/coral-xyz/anchor/pull/2420)).

### Breaking

Expand Down
Loading

0 comments on commit 5014529

Please sign in to comment.