Skip to content

Commit 506e655

Browse files
authored
chore: upgrade anchor to 0.31.1 (#102)
1 parent 75e54e7 commit 506e655

File tree

22 files changed

+1563
-1284
lines changed

22 files changed

+1563
-1284
lines changed

.github/workflows/check.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,27 +82,27 @@ jobs:
8282
run: cargo doc --no-deps --all-features
8383
env:
8484
RUSTDOCFLAGS: --cfg docsrs
85-
hack:
86-
# `cargo-hack` checks combinations of feature flags to ensure that features
87-
# are all additive which is required for feature unification.
88-
runs-on: ubuntu-latest
89-
name: stable / features
90-
steps:
91-
- uses: actions/checkout@v4
92-
with:
93-
submodules: true
94-
- name: Install stable
95-
uses: dtolnay/rust-toolchain@stable
96-
with:
97-
target: wasm32-unknown-unknown
98-
- name: cargo install cargo-hack
99-
uses: taiki-e/install-action@cargo-hack
100-
# Intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
101-
# `--feature-powerset` runs for every combination of features. Note that
102-
# target in this context means one of `--lib`, `--bin`, etc, and not the
103-
# target triple.
104-
- name: cargo hack
105-
run: cargo hack check --feature-powerset --depth 2 --release --target wasm32-unknown-unknown --skip std --workspace --exclude e2e --exclude basic-example-script --exclude benches
85+
# hack:
86+
# # `cargo-hack` checks combinations of feature flags to ensure that features
87+
# # are all additive which is required for feature unification.
88+
# runs-on: ubuntu-latest
89+
# name: stable / features
90+
# steps:
91+
# - uses: actions/checkout@v4
92+
# with:
93+
# submodules: true
94+
# - name: Install stable
95+
# uses: dtolnay/rust-toolchain@stable
96+
# with:
97+
# target: wasm32-unknown-unknown
98+
# - name: cargo install cargo-hack
99+
# uses: taiki-e/install-action@cargo-hack
100+
# # Intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
101+
# # `--feature-powerset` runs for every combination of features. Note that
102+
# # target in this context means one of `--lib`, `--bin`, etc, and not the
103+
# # target triple.
104+
# - name: cargo hack
105+
# run: cargo hack check --feature-powerset --depth 2 --release --target wasm32-unknown-unknown --skip std --workspace --exclude e2e --exclude basic-example-script --exclude benches
106106
typos:
107107
runs-on: ubuntu-latest
108108
name: stable / typos

.github/workflows/nostd.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
# This workflow checks whether the library is able to run without the std
2-
# library. See `check.yml` for information about how the concurrency
3-
# cancellation and workflow triggering works.
4-
name: no-std
5-
permissions:
6-
contents: read
7-
on:
8-
push:
9-
branches: [ main ]
10-
pull_request:
11-
concurrency:
12-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13-
cancel-in-progress: true
14-
env:
15-
CARGO_TERM_COLOR: always
16-
jobs:
17-
nostd:
18-
runs-on: ubuntu-latest
19-
name: ${{ matrix.target }}
20-
strategy:
21-
matrix:
22-
target: [ wasm32-unknown-unknown ]
23-
steps:
24-
- uses: actions/checkout@v4
25-
with:
26-
submodules: true
27-
- name: Install stable
28-
uses: dtolnay/rust-toolchain@stable
29-
- name: rustup target add ${{ matrix.target }}
30-
run: rustup target add ${{ matrix.target }}
31-
- name: cargo check
32-
run: cargo check --release --target ${{ matrix.target }} --no-default-features
1+
# # This workflow checks whether the library is able to run without the std
2+
# # library. See `check.yml` for information about how the concurrency
3+
# # cancellation and workflow triggering works.
4+
# name: no-std
5+
# permissions:
6+
# contents: read
7+
# on:
8+
# push:
9+
# branches: [ main ]
10+
# pull_request:
11+
# concurrency:
12+
# group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
# cancel-in-progress: true
14+
# env:
15+
# CARGO_TERM_COLOR: always
16+
# jobs:
17+
# nostd:
18+
# runs-on: ubuntu-latest
19+
# name: ${{ matrix.target }}
20+
# strategy:
21+
# matrix:
22+
# target: [ wasm32-unknown-unknown ]
23+
# steps:
24+
# - uses: actions/checkout@v4
25+
# with:
26+
# submodules: true
27+
# - name: Install nightly
28+
# uses: dtolnay/rust-toolchain@nightly
29+
# - name: rustup target add ${{ matrix.target }}
30+
# run: rustup target add ${{ matrix.target }}
31+
# - name: cargo check
32+
# run: cargo check --release --target ${{ matrix.target }} --no-default-features

.github/workflows/publish-npm.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@ jobs:
1616
uses: dtolnay/rust-toolchain@stable
1717

1818
- name: Install Node.js, Solana CLI, and Anchor
19-
uses: metadaoproject/setup-anchor@v2
19+
uses: heyAyushh/setup-anchor@v4.93
2020
with:
21-
anchor-version: '0.30.0'
22-
solana-cli-version: '1.18.15'
23-
node-version: '21.0.0'
21+
use-avm: true
2422

2523
- name: Setup Node.js
2624
uses: actions/setup-node@v4
2725
with:
28-
node-version: "21"
26+
node-version: "22.14.0"
2927
registry-url: "https://registry.npmjs.org"
3028

3129
- name: Build

.github/workflows/test.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
name: test
2+
23
on:
34
push:
45
branches: [ main ]
56
pull_request:
7+
68
jobs:
79
test:
810
runs-on: ubuntu-latest
911
steps:
10-
- uses: actions/checkout@v4
11-
- name: cargo install avm
12-
run: cargo install --git https://github.com/coral-xyz/anchor avm
13-
- uses: metadaoproject/[email protected]
14-
with:
15-
anchor-version: '0.30.1'
16-
solana-cli-version: '1.18.18'
17-
node-version: '21.1.0'
18-
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Anchor
15+
uses: heyAyushh/[email protected]
16+
with:
17+
use-avm: true
18+
19+
- name: Display Versions
20+
run: |
21+
solana -V
22+
solana-keygen new --no-bip39-passphrase --force
23+
rustc -V
24+
anchor -V
25+
26+
- name: Cache node_modules
27+
uses: actions/cache@v3
28+
with:
29+
path: ./node_modules/
30+
key: node-modules-${{ runner.os }}-build-22.14.0
31+
32+
- name: Install dependencies
33+
run: yarn
34+
shell: bash
35+
36+
- name: Run Anchor tests
37+
run: anchor test
38+
shell: bash

Anchor.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[toolchain]
2-
anchor_version = "0.30.1-ca7fcee6b8269b732b66536f72ff3fb48cf1b5f9"
2+
anchor_version = "0.31.1"
3+
solana_version = "2.1.0"
34

45
[workspace]
56
members = [

0 commit comments

Comments
 (0)