Skip to content

fix: upgrade anchor to 0.31.1 #972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 28 additions & 25 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:
with:
node-version: "${{ matrix.node }}"
cache: yarn
- name: Setup Anchor & Build
uses: metadaoproject/setup-anchor@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this used @coral-xyz/anchor-cli npm package which has not been updated for a while, hence switching to solana-developers/github-actions which autodetects the used versions and installs them.

- name: Extract Solana versions
uses: solana-developers/github-actions/extract-versions@v0.2.5
id: versions
- name: Setup Anchor & Solana
uses: solana-developers/github-actions/setup-all@v0.2.5
with:
anchor-version: 0.30.1
solana-cli-version: 1.18.21
node-version: 20
- name: Create keypair
run: solana-keygen new --no-bip39-passphrase
shell: bash
anchor_version: ${{ steps.versions.outputs.anchor_version }}
solana_version: ${{ steps.versions.outputs.solana_version }}
node_version: 20
- name: Install Cargo toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2025-04-01
toolchain: nightly
profile: minimal
components: rustc
components: rustc, rustfmt
- name: Install packages
run: yarn install --frozen-lockfile && rustup component add --toolchain nightly-2025-04-01-x86_64-unknown-linux-gnu rustfmt
run: yarn install --frozen-lockfile
- name: Lint js
shell: bash
run: yarn lint-js
Expand All @@ -57,19 +57,19 @@ jobs:
with:
node-version: "${{ matrix.node }}"
cache: yarn
- name: Setup Anchor & Build
uses: metadaoproject/setup-anchor@v2
- name: Extract Solana versions
uses: solana-developers/github-actions/extract-versions@v0.2.5
id: versions
- name: Setup Anchor & Solana
uses: solana-developers/github-actions/setup-all@v0.2.5
with:
anchor-version: 0.30.1
solana-cli-version: 1.18.21
node-version: 20
- name: Create keypair
run: solana-keygen new --no-bip39-passphrase
shell: bash
anchor_version: ${{ steps.versions.outputs.anchor_version }}
solana_version: ${{ steps.versions.outputs.solana_version }}
node_version: 20
- name: Install Cargo toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2025-04-01
toolchain: stable
profile: minimal
components: rustc
- name: Cache Cargo dependencies
Expand Down Expand Up @@ -99,12 +99,15 @@ jobs:
with:
node-version: "${{ matrix.node }}"
cache: yarn
- name: Setup Anchor & Build
uses: metadaoproject/setup-anchor@v2
- name: Extract Solana versions
uses: solana-developers/github-actions/extract-versions@v0.2.5
id: versions
- name: Setup Anchor & Solana
uses: solana-developers/github-actions/setup-all@v0.2.5
with:
anchor-version: 0.30.1
solana-cli-version: 1.18.21
node-version: 20
anchor_version: ${{ steps.versions.outputs.anchor_version }}
solana_version: ${{ steps.versions.outputs.solana_version }}
node_version: 20
- name: Install packages
run: yarn install --frozen-lockfile
- name: Install Foundry
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ jobs:
id: release
uses: manovotny/github-releases-for-automated-package-publishing-action@v2.0.1
# Setup Anchor to enable compilation and export of Solana programs
- name: Setup Anchor & Build
uses: metadaoproject/setup-anchor@v2
- name: Extract Solana versions
uses: solana-developers/github-actions/extract-versions@v0.2.5
id: versions
- name: Setup Anchor & Solana
uses: solana-developers/github-actions/setup-all@v0.2.5
with:
anchor-version: "0.30.1"
solana-cli-version: "1.18.21"
node-version: "20.17.0"
anchor_version: ${{ steps.versions.outputs.anchor_version }}
solana_version: ${{ steps.versions.outputs.solana_version }}
node_version: 20
# - run: anchor build
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
Expand Down
Loading
Loading