From 0c406cba58a7d062f48808ea591c236f623666c9 Mon Sep 17 00:00:00 2001 From: Forpee Date: Tue, 10 Jun 2025 11:08:02 +0200 Subject: [PATCH 1/3] ci: fix cancellations --- .github/workflows/rust.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 001b7df..fc707ce 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -37,7 +37,8 @@ jobs: tests: runs-on: ubuntu-latest needs: lint - + timeout-minutes: 360 + steps: - uses: actions/checkout@v4 @@ -49,6 +50,10 @@ jobs: override: true - name: Run tests - run: cargo test -r -- --ignored + run: | + timeout 21600 bash -c ' + while true; do echo "🟢 still running..."; sleep 60; done & + RUST_LOG=debug cargo test -r -- --ignored + ' From b5c3b04d8a66518de2223f2e89cb92858833a9ab Mon Sep 17 00:00:00 2001 From: Forpee Date: Sat, 14 Jun 2025 13:04:40 +0200 Subject: [PATCH 2/3] wip: try matrix strat --- .github/workflows/rust.yml | 23 +++++++++++++++-------- src/tests.rs | 9 --------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fc707ce..0417f95 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,7 +11,6 @@ on: jobs: lint: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 @@ -34,11 +33,19 @@ jobs: - name: Build for WASM run: cargo build --target wasm32-unknown-unknown + tests: - runs-on: ubuntu-latest needs: lint + runs-on: ubuntu-latest timeout-minutes: 360 - + strategy: + matrix: + test_name: + - test_gradient_boosting + - test_integer_hash + - test_bulk_ops + - test_toy_rsa + steps: - uses: actions/checkout@v4 @@ -49,11 +56,11 @@ jobs: profile: minimal override: true - - name: Run tests + - name: Run ${{ matrix.test_name }} run: | + # keep the runner alive and then run just this one ignored test timeout 21600 bash -c ' while true; do echo "🟢 still running..."; sleep 60; done & - RUST_LOG=debug cargo test -r -- --ignored - ' - - + RUST_LOG=debug cargo test --package zk-engine --lib \ + -- tests::${{ matrix.test_name }} --exact --show-output --ignored + ' \ No newline at end of file diff --git a/src/tests.rs b/src/tests.rs index 5ed4478..4e773cb 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -33,15 +33,6 @@ fn test_wasm_snark_with(wasm_ctx: impl ZKWASMCtx, step_size: StepSize) -> Result let verification_timer = start_timer!("Verifying RecursiveWasmSNARK"); rs_snark.verify(&pp, &U).unwrap(); stop_timer!(verification_timer); - - let proving_timer = start_timer!("Producing compressedSNARK"); - let snark = rs_snark.compress(&pp, &U)?; - stop_timer!(proving_timer); - - let verification_timer = start_timer!("Verifying WasmSNARK"); - snark.verify(&pp, &U).unwrap(); - stop_timer!(verification_timer); - Ok(()) } From 835cbbe687491e9511a864bff6fe429d735bac61 Mon Sep 17 00:00:00 2001 From: Forpee Date: Sat, 14 Jun 2025 13:08:17 +0200 Subject: [PATCH 3/3] ci: run on release --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0417f95..e0d9ceb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -61,6 +61,6 @@ jobs: # keep the runner alive and then run just this one ignored test timeout 21600 bash -c ' while true; do echo "🟢 still running..."; sleep 60; done & - RUST_LOG=debug cargo test --package zk-engine --lib \ + RUST_LOG=debug cargo test --release --package zk-engine --lib \ -- tests::${{ matrix.test_name }} --exact --show-output --ignored ' \ No newline at end of file