Skip to content

Commit 3acc654

Browse files
committed
Use setup-arcium@v0.5.4 then override with Arcium 0.6.2
Instead of manually installing Rust/Solana/Anchor: - Use setup-arcium@v0.5.4 action (which works) to install dependencies - Override with Arcium 0.6.2 binary (arcup 0.6.2 has bootstrap bug) This is cleaner and uses cached binaries from setup-arcium action.
1 parent f48d430 commit 3acc654

File tree

1 file changed

+13
-43
lines changed

1 file changed

+13
-43
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,23 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414

15-
- name: Install libudev
16-
run: sudo apt-get update && sudo apt-get install -y libudev-dev
17-
18-
- name: Cache Cargo registry and installed binaries
19-
uses: actions/cache@v3
20-
with:
21-
path: |
22-
~/.cargo/bin/
23-
~/.cargo/registry/index/
24-
~/.cargo/registry/cache/
25-
~/.cargo/git/db/
26-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
27-
restore-keys: |
28-
${{ runner.os }}-cargo-
29-
30-
- name: Cache Solana CLI
31-
uses: actions/cache@v3
15+
# Use setup-arcium@v0.5.4 to install Rust, Solana, Anchor, and arcup
16+
# Then override with Arcium 0.6.2 binary since arcup 0.6.2 has bootstrap bug
17+
- uses: arcium-hq/setup-arcium@v0.5.4
3218
with:
33-
path: ~/.local/share/solana/install
34-
key: ${{ runner.os }}-solana-2.3.11
35-
restore-keys: |
36-
${{ runner.os }}-solana-
37-
38-
- name: Install Rust
39-
run: |
40-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
41-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
42-
43-
- name: Install Solana CLI
44-
run: |
45-
sh -c "$(curl -sSfL https://release.anza.xyz/v2.3.11/install)"
46-
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
47-
48-
- name: Install Anchor
49-
run: cargo install --git https://github.com/solana-foundation/anchor --tag v0.32.1 anchor-cli --locked
50-
51-
# TODO: Restore setup-arcium action once arcup 0.6.2 bootstrap bug is fixed
52-
# Currently cannot use arcium-hq/setup-arcium action because arcup 0.6.2 has a bootstrap bug
53-
# where it panics with "index not found" at arcup/src/config.rs:29:51 when running
54-
# 'arcup list' or 'arcup install'. The arcup binary doesn't have version 0.6.2 in its
55-
# internal configuration/version list. Workaround: download arcium CLI binary directly.
56-
- name: Install Arcium CLI
19+
runner-arch-os: "x86_64_linux"
20+
arcium-version: "0.5.4"
21+
solana-cli-version: "2.3.11"
22+
anchor-version: "0.32.1"
23+
24+
# Override with Arcium 0.6.2 binary
25+
# arcup 0.6.2 has bootstrap bug (panics with "index not found" at arcup/src/config.rs:29:51)
26+
# so we download the 0.6.2 binary directly instead of using arcup
27+
- name: Override with Arcium CLI 0.6.2
5728
run: |
5829
curl "https://bin.arcium.com/download/arcium_x86_64_linux_0.6.2" -o ~/.cargo/bin/arcium
5930
chmod +x ~/.cargo/bin/arcium
60-
61-
- run: solana --version
31+
arcium --version
6232
6333
# Generate keypair needed for Anchor to work. Anchor.toml specifies
6434
# wallet = "~/.config/solana/id.json" which arcium test requires to exist.

0 commit comments

Comments
 (0)