Skip to content

Commit

Permalink
Upgrade Solana to v2 and SPL to the latest (#3219)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto committed Sep 17, 2024
1 parent 8d52c1c commit 020a304
Show file tree
Hide file tree
Showing 31 changed files with 609 additions and 796 deletions.
14 changes: 1 addition & 13 deletions .github/actions/setup-solana/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,7 @@ runs:
max_attempts: 10
retry_on: error
shell: bash
command: sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_CLI_VERSION }}/install)"
- uses: nick-fields/retry@v2
if: steps.cache-solana.outputs.cache-hit != 'true'
with:
retry_wait_seconds: 300
timeout_minutes: 2
max_attempts: 10
retry_on: error
shell: bash
command: |
curl -sSL -o /home/runner/.local/share/solana/install/active_release/bin/solang \
https://github.com/hyperledger/solang/releases/download/v${{ env.SOLANG_VERSION }}/solang-linux-x86-64
chmod 755 /home/runner/.local/share/solana/install/active_release/bin/solang
command: sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_CLI_VERSION }}/install)"
- run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
shell: bash
- run: solana-keygen new --no-bip39-passphrase
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/no-caching-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: false
solana_cli_version: 1.18.17
solang_version: 0.3.2
solana_cli_version: 2.0.8
node_version: 20.16.0
cargo_profile: release
anchor_binary_name: anchor-binary-no-caching
6 changes: 1 addition & 5 deletions .github/workflows/reusable-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
solana_cli_version:
required: true
type: string
solang_version:
required: true
type: string
node_version:
required: true
type: string
Expand All @@ -24,7 +21,6 @@ on:
env:
CACHE: inputs.cache
SOLANA_CLI_VERSION: ${{ inputs.solana_cli_version }}
SOLANG_VERSION: ${{ inputs.solang_version }}
NODE_VERSION: ${{ inputs.node_version }}
CARGO_PROFILE: ${{ inputs.cargo_profile }}
ANCHOR_BINARY_NAME: ${{ inputs.anchor_binary_name }}
Expand Down Expand Up @@ -396,7 +392,7 @@ jobs:
# - cmd: cd tests/lockup && anchor test --skip-lint
# path: tests/lockup
# TODO: Re-enable after making it work with Solana v2
# - cmd: cd tests/swap/deps/openbook-dex/dex && solana-install init 1.14.18 && cargo build-bpf -- --locked && cd ../../../ && solana-install init $SOLANA_CLI_VERSION && anchor test --skip-lint
# - cmd: cd tests/swap && anchor test --skip-lint
# path: tests/swap
- cmd: cd tests/escrow && anchor test --skip-lint && npx tsc --noEmit
path: tests/escrow
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: true
solana_cli_version: 1.18.17
solang_version: 0.3.2
solana_cli_version: 2.0.8
node_version: 20.16.0
cargo_profile: debug
anchor_binary_name: anchor-binary
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "examples/swap/deps/openbook-dex"]
path = tests/swap/deps/openbook-dex
url = https://github.com/openbook-dex/program
[submodule "examples/cfo/deps/openbook-dex"]
path = tests/cfo/deps/openbook-dex
url = https://github.com/openbook-dex/program
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ The minor version will be incremented upon a breaking change and the patch versi
- cli: Accept integers for `warp_slot` ([#3235](https://github.com/coral-xyz/anchor/pull/3235)).
- lang: Remove `EventIndex` ([#3244](https://github.com/coral-xyz/anchor/pull/3244)).
- spl: Remove `dex` feature ([#3257](https://github.com/coral-xyz/anchor/pull/3257)).
- client, lang, spl: Upgrade Solana to v2 and SPL to the latest ([#3219](https://github.com/coral-xyz/anchor/pull/3219)).

## [0.30.1] - 2024-06-20

Expand Down
Loading

0 comments on commit 020a304

Please sign in to comment.