Skip to content

Commit cf6ee79

Browse files
committed
Add a workaround for setup-arcium not working on 0.6.2
1 parent 91f430f commit cf6ee79

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,30 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515

16-
- name: Install libudev
17-
run: sudo apt-get update && sudo apt-get install -y libudev-dev
18-
16+
# Use setup-arcium@v0.5.4 to install Rust, Solana, Anchor, and arcup
17+
# Then override with Arcium 0.6.2 binary since arcup 0.6.2 has bootstrap bug
1918
- uses: arcium-hq/setup-arcium@v0.5.4
2019
with:
21-
runner-arch-os: x86_64_linux
22-
solana-cli-version: 2.3.11
23-
arcium-version: 0.6.2
24-
anchor-version: 0.32.1
20+
runner-arch-os: "x86_64_linux"
21+
arcium-version: "0.5.4"
22+
solana-cli-version: "2.3.11"
23+
anchor-version: "0.32.1"
24+
25+
# Override with Arcium 0.6.2 binary
26+
# arcup 0.6.2 has bootstrap bug (panics with "index not found" at arcup/src/config.rs:29:51)
27+
# so we download the 0.6.2 binary directly instead of using arcup
28+
- name: Override with Arcium CLI 0.6.2
29+
run: |
30+
curl "https://bin.arcium.com/download/arcium_x86_64_linux_0.6.2" -o ~/.cargo/bin/arcium
31+
chmod +x ~/.cargo/bin/arcium
32+
arcium --version
2533
26-
- run: solana --version
34+
# Verify Docker is running and can pull images
35+
# Arcium requires Docker to run MPC nodes during tests
36+
- name: Verify Docker
37+
run: |
38+
docker info
39+
docker ps
2740
2841
- run: npm i
2942

tests/election.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { getSetComputeUnitLimitInstruction } from "@solana-program/compute-budget";
22
import { randomBytes } from "crypto";
3+
import { promises as fs } from "fs";
34
import { connect, type Connection } from "solana-kite";
45
import {
56
type KeyPairSigner,
@@ -24,7 +25,6 @@ import {
2425
} from "./arcium-solana-kit/helpers.js";
2526
import * as os from "os";
2627
import { describe, test, before } from "node:test";
27-
import assert from "node:assert";
2828
import {
2929
getRandomBigInt,
3030
makeClientSideKeys,
@@ -386,7 +386,7 @@ describe("Election", () => {
386386
compDefAccount: compDefPDA,
387387
});
388388

389-
const instructions = [];
389+
const instructions: Array<Instruction> = [];
390390

391391
if (needsComputeBudget) {
392392
// create_poll circuit requires higher compute budget due to initialization complexity

0 commit comments

Comments
 (0)