55 branches :
66 - develop
77 - main
8- - " pre-develop-[0-9]+.[0-9]+.[0-9]+ "
8+ - " pre-develop-[0-9]+.[0-9]+.[0-9]* "
99 paths-ignore :
1010 - ' book/**'
1111 workflow_dispatch :
@@ -14,39 +14,117 @@ concurrency:
1414 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
1515 cancel-in-progress : true
1616
17+ permissions :
18+ contents : read
19+
1720jobs :
1821 cargo-tests :
1922 name : Cargo tests
20- runs-on : ubuntu-latest
23+ runs-on : rocket
24+ container :
25+ image : ubuntu:22.04
2126 env :
2227 CARGO_NET_GIT_FETCH_WITH_CLI : " true"
28+
2329 steps :
2430 - name : Checkout sources
2531 uses : actions/checkout@v4
2632
2733 - name : Install dependencies
2834 run : |
2935 cd "$GITHUB_WORKSPACE/tools/test-env"
30- sudo ./install_deps.sh
36+ ./install_deps.sh
37+
38+ - name : Add Cargo to PATH
39+ # install_deps.sh already installs Rust via rustup into ~/.cargo/bin;
40+ # just expose it to subsequent steps.
41+ run : echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
42+
43+ - name : Show versions
44+ run : |
45+ rustc --version
46+ cargo --version
47+
48+ - name : Build cargo-zisk
49+ run : cargo build --bin cargo-zisk
50+
51+ - name : Install ZisK rust toolchain
52+ run : ./target/debug/cargo-zisk toolchain install
3153
3254 - name : Run cargo check
33- uses : actions-rs/cargo@v1
34- with :
35- command : check
36- args : --all-targets # --all-features
55+ run : cargo check --all-targets
3756
3857 - name : Run cargo test
39- uses : actions-rs/cargo@v1
40- with :
41- command : test
42- args : --workspace --release
58+ run : cargo test --workspace --release
4359 env :
4460 RUSTFLAGS : -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
4561 RUST_BACKTRACE : 1
4662
63+ zisk-contracts :
64+ name : Hardhat tests (zisk-contracts)
65+ runs-on : ubuntu-latest
66+ timeout-minutes : 20
67+ env :
68+ CARGO_NET_GIT_FETCH_WITH_CLI : " true"
69+ steps :
70+ - name : Checkout sources
71+ uses : actions/checkout@v4
72+
73+ - name : Install system dependencies
74+ run : |
75+ cd "$GITHUB_WORKSPACE/tools/test-env"
76+ sudo ./install_deps.sh
77+
78+ - name : Install Node.js
79+ uses : actions/setup-node@v4
80+ with :
81+ node-version : 20
82+
83+ - uses : Swatinem/rust-cache@v2
84+ with :
85+ cache-on-failure : true
86+
87+ - name : Build cargo-zisk-dev
88+ run : cargo build --release -p cargo-zisk --bin cargo-zisk-dev
89+
90+ - name : Generate Solidity calldata fixture
91+ working-directory : zisk-contracts
92+ run : ../target/release/cargo-zisk-dev export-solidity-calldata -p test/plonk_proof.bin -o fixtures/fixture.json
93+
94+ - name : Install JS dependencies
95+ working-directory : zisk-contracts
96+ run : npm install --no-audit --no-fund
97+
98+ - name : Run Hardhat test
99+ working-directory : zisk-contracts
100+ env :
101+ ZISK_SOLIDITY_FIXTURE : fixtures/fixture.json
102+ run : npx hardhat test
103+
104+ build-riscv64im :
105+ name : Build ziskos-staticlib (riscv64im-unknown-none-elf)
106+ runs-on : ubuntu-latest
107+ env :
108+ CARGO_NET_GIT_FETCH_WITH_CLI : " true"
109+ steps :
110+ - name : Checkout sources
111+ uses : actions/checkout@v4
112+
113+ - name : Install Rust nightly with rust-src
114+ # riscv64im-unknown-none-elf is a Tier 3 target — no pre-built std is available.
115+ # rust-src is required so that -Z build-std can compile core/alloc from source.
116+ # No cross-compiler is needed; Rust uses its bundled rust-lld linker.
117+ run : rustup toolchain install nightly --component rust-src --no-self-update
118+
119+ - name : Build ziskos-staticlib for riscv64im-unknown-none-elf
120+ run : cargo +nightly build -p ziskos-staticlib --release --target riscv64im-unknown-none-elf -Z build-std=core,alloc --config 'profile.release.lto="fat"' --features panic-handler
121+ env :
122+ RUSTFLAGS : " -D warnings"
123+
47124 test-x86_64 :
48125 name : Test on Ubuntu x86_64
49- runs-on : gpu-hosted
126+ runs-on :
127+ group : zisk-gpu
50128 timeout-minutes : 180
51129 # NOTE: We intentionally use 'docker exec' in individual steps rather than
52130 # defining a job-level container. The test scripts deploy systemd services
@@ -73,6 +151,12 @@ jobs:
73151 sudo chown -R 1000:1000 "$GITHUB_WORKSPACE"
74152 sudo chmod -R u+rwX "$GITHUB_WORKSPACE"
75153
154+ - name : Prepare cache-setup directory
155+ run : |
156+ sudo mkdir -p /home/gha/cache-setup
157+ sudo chown -R 1000:1000 /home/gha/cache-setup
158+ sudo chmod -R u+rwX /home/gha/cache-setup
159+
76160 - name : Start test container with systemd
77161 run : |
78162 docker rm -f "${TEST_CONTAINER}" || true
88172 -v /home/gha/cache-setup:/home/ziskuser/output:rw \
89173 -e ZISK_GHA=1 \
90174 -e ZISK_REPO_DIR=/workspace/zisk \
91- -e ZISK_TESTVECTORS_BRANCH="${ZISK_TESTVECTORS_BRANCH}" \
92175 -e PROVE_FLAGS=-y \
93176 -e TERM=xterm \
94177 ziskvm/zisk-runner-gpu:latest \
@@ -110,6 +193,24 @@ jobs:
110193 systemctl is-system-running || true
111194 '
112195
196+ # Wait for the in-container Docker daemon (started by systemd) to be
197+ # ready. lib-float/build.rs invokes `docker` early in the build, so it
198+ # must be up before the "Build ZisK" step runs.
199+ echo "Waiting for in-container Docker daemon..."
200+ for i in $(seq 1 30); do
201+ if docker exec -u ziskuser "${TEST_CONTAINER}" docker info >/dev/null 2>&1; then
202+ echo "Docker daemon is ready."
203+ break
204+ fi
205+ if [ "$i" -eq 30 ]; then
206+ echo "Docker daemon did not become ready in time"
207+ docker exec "${TEST_CONTAINER}" systemctl status docker.service --no-pager || true
208+ docker exec "${TEST_CONTAINER}" journalctl -u docker.service --no-pager -n 50 || true
209+ exit 1
210+ fi
211+ sleep 2
212+ done
213+
113214 - name : Build ZisK
114215 run : |
115216 .github/scripts/docker_exec.sh \
@@ -168,12 +269,20 @@ jobs:
168269 ./test_diagnostic.sh
169270 '
170271
272+ - name : Build zec-reth ELF file
273+ run : |
274+ .github/scripts/docker_exec.sh \
275+ -u ziskuser \
276+ -- bash -lc '
277+ cd /workspace/zisk/tools/test-env
278+ ./build_zec_reth.sh
279+ '
280+
171281 - name : Prove Ethereum block
172282 run : |
173283 .github/scripts/docker_exec.sh \
174284 -u ziskuser \
175285 -e BLOCK_INPUTS_SINGLE="mainnet_24628607_66_7_zec_reth.bin,mainnet_24626900_221_16_zec_reth.bin" \
176- -e ZISK_ETH_CLIENT_BRANCH="${ZISK_ETH_CLIENT_BRANCH}" \
177286 -- bash -lc '
178287 cd /workspace/zisk/tools/test-env
179288 ./test_eth_block.sh
@@ -184,8 +293,6 @@ jobs:
184293 .github/scripts/docker_exec.sh \
185294 -u ziskuser \
186295 -e BLOCK_INPUTS_ETHPROOFS="mainnet_24628595_641_54_zec_reth.bin,mainnet_24697073_308_22_zec_reth.bin" \
187- -e ZISK_ETHPROOFS_BRANCH="${ZISK_ETHPROOFS_BRANCH}" \
188- -e ZISK_ETH_CLIENT_BRANCH="${ZISK_ETH_CLIENT_BRANCH}" \
189296 -- bash -lc '
190297 cd /workspace/zisk/tools/test-env
191298 ./test_ethproofs.sh
@@ -195,8 +302,6 @@ jobs:
195302 run : |
196303 .github/scripts/docker_exec.sh \
197304 -u ziskuser \
198- -e ZISK_ETHPROOFS_BRANCH="${ZISK_ETHPROOFS_BRANCH}" \
199- -e ZISK_ETH_CLIENT_BRANCH="${ZISK_ETH_CLIENT_BRANCH}" \
200305 -e ENABLE_HINTS="1" \
201306 -- bash -lc '
202307 cd /workspace/zisk/tools/test-env
@@ -213,7 +318,7 @@ jobs:
213318 test-macos :
214319 name : Test on macOS
215320 runs-on : macos-14
216- timeout-minutes : 30
321+ timeout-minutes : 45
217322 defaults :
218323 run :
219324 shell : bash
@@ -238,6 +343,11 @@ jobs:
238343 cd "$GITHUB_WORKSPACE/tools/test-env"
239344 ./build_zisk.sh
240345
346+ - name : Build zec-reth ELF file
347+ run : |
348+ cd "$GITHUB_WORKSPACE/tools/test-env"
349+ ./build_zec_reth.sh
350+
241351 - name : Test sha_hasher
242352 run : |
243353 cd "$GITHUB_WORKSPACE/tools/test-env"
@@ -283,6 +393,15 @@ jobs:
283393 env :
284394 CARGO_INCREMENTAL : 1
285395
396+ - name : Build cargo-zisk
397+ uses : actions-rs/cargo@v1
398+ with :
399+ command : build
400+ args : --bin cargo-zisk
401+
402+ - name : Install ZisK rust toolchain
403+ run : ./target/debug/cargo-zisk toolchain install
404+
286405 - name : Run cargo clippy
287406 uses : actions-rs/cargo@v1
288407 with :
0 commit comments