From b008d7304876a8d9703ea331fa50e9748b6bb7de Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Mon, 23 Mar 2026 09:35:09 +0000 Subject: [PATCH 1/5] chore: ci improvements --- .github/workflows/ci.yml | 25 ++++++++----------------- tests/integration/persist.sh | 2 +- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7feabc9c8c..ccf07a7a36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: echo "zk=$(any $FORCE $RUST $CIRCUITS $CI)" >> $GITHUB_OUTPUT echo "contracts=$(any $FORCE $CONTRACTS $CI)" >> $GITHUB_OUTPUT echo "docker_support=$(any $FORCE $DOCKER $CI)" >> $GITHUB_OUTPUT - echo "docker_ciphernode=$(any $FORCE $RUST $CONTRACTS $DOCKER $CI)" >> $GITHUB_OUTPUT + echo "docker_ciphernode=$(any $FORCE $RUST $DOCKER $CI)" >> $GITHUB_OUTPUT echo "net=$(any $FORCE $INTEGRATION $CI)" >> $GITHUB_OUTPUT echo "init=$(any $FORCE $TEMPLATES $RUST $CONTRACTS $CI)" >> $GITHUB_OUTPUT echo "build_e3_support_dev=$(any $FORCE $TEMPLATES $RUST $CONTRACTS $SDK $CI)" >> $GITHUB_OUTPUT @@ -472,9 +472,8 @@ jobs: labels: [enclave-ci-runner] strategy: matrix: - # TODO removed base test for now test-suite: [base, persist] - fail-fast: false + fail-fast: true steps: - name: 'Check out the repo' uses: 'actions/checkout@v6' @@ -583,6 +582,10 @@ jobs: if: needs.detect_changes.outputs.crisp == 'true' timeout-minutes: 30 runs-on: 'ubuntu-latest' + strategy: + matrix: + test-suite: [test:circuits, test:sdk, test:contracts, cargo test] + fail-fast: false steps: - uses: actions/checkout@v6 with: @@ -631,27 +634,15 @@ jobs: && sudo apt-get update -y \ && sudo apt-get install -y solc - - name: Run Rust tests - working-directory: ./examples/CRISP - run: 'cargo test' - - name: Download Crisp SDK artifacts uses: actions/download-artifact@v4 with: name: crisp-sdk-artifacts path: . - - name: Run Noir tests - working-directory: ./examples/CRISP - run: 'pnpm test:circuits' - - - name: Run JavaScript tests - working-directory: ./examples/CRISP - run: 'pnpm test:sdk' - - - name: Run Solidity tests + - name: Run ${{ matrix.test-suite }} working-directory: ./examples/CRISP - run: 'pnpm test:contracts' + run: 'pnpm ${{ matrix.test-suite }}' crisp_e2e: needs: [detect_changes, build_enclave_cli, build_crisp_sdk] diff --git a/tests/integration/persist.sh b/tests/integration/persist.sh index 20fce089cd..59c12d6890 100755 --- a/tests/integration/persist.sh +++ b/tests/integration/persist.sh @@ -69,7 +69,7 @@ pnpm committee:new \ --input-window-end "$INPUT_WINDOW_END" \ --e3-params "$ENCODED_PARAMS" \ --committee-size 0 \ - --proof-aggregation-enabled true + --proof-aggregation-enabled false waiton "$SCRIPT_DIR/output/pubkey.bin" From a7c319b26e3e582def013e873011b4eef0ed8ef3 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Wed, 25 Mar 2026 14:49:42 +0100 Subject: [PATCH 2/5] fix(ci): align ciphernode docker and CRISP unit matrix - Include CONTRACTS in docker_ciphernode change detection so contract-only PRs rebuild the image - Use matrix include with explicit commands so cargo test runs without pnpm cargo test Made-with: Cursor --- .github/workflows/ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccf07a7a36..7803cba5a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,7 +108,7 @@ jobs: echo "zk=$(any $FORCE $RUST $CIRCUITS $CI)" >> $GITHUB_OUTPUT echo "contracts=$(any $FORCE $CONTRACTS $CI)" >> $GITHUB_OUTPUT echo "docker_support=$(any $FORCE $DOCKER $CI)" >> $GITHUB_OUTPUT - echo "docker_ciphernode=$(any $FORCE $RUST $DOCKER $CI)" >> $GITHUB_OUTPUT + echo "docker_ciphernode=$(any $FORCE $RUST $DOCKER $CI $CONTRACTS)" >> $GITHUB_OUTPUT echo "net=$(any $FORCE $INTEGRATION $CI)" >> $GITHUB_OUTPUT echo "init=$(any $FORCE $TEMPLATES $RUST $CONTRACTS $CI)" >> $GITHUB_OUTPUT echo "build_e3_support_dev=$(any $FORCE $TEMPLATES $RUST $CONTRACTS $SDK $CI)" >> $GITHUB_OUTPUT @@ -584,7 +584,15 @@ jobs: runs-on: 'ubuntu-latest' strategy: matrix: - test-suite: [test:circuits, test:sdk, test:contracts, cargo test] + include: + - test-suite: test:circuits + command: pnpm test:circuits + - test-suite: test:sdk + command: pnpm test:sdk + - test-suite: test:contracts + command: pnpm test:contracts + - test-suite: cargo test + command: cargo test fail-fast: false steps: - uses: actions/checkout@v6 @@ -642,7 +650,7 @@ jobs: - name: Run ${{ matrix.test-suite }} working-directory: ./examples/CRISP - run: 'pnpm ${{ matrix.test-suite }}' + run: ${{ matrix.command }} crisp_e2e: needs: [detect_changes, build_enclave_cli, build_crisp_sdk] From 5ebaa943fb930bf728fa5b4c3d185cef1915b4fa Mon Sep 17 00:00:00 2001 From: Cedoor Date: Wed, 25 Mar 2026 15:03:31 +0100 Subject: [PATCH 3/5] perf(ci): gate crisp_unit steps by matrix test suite - Rust cache, toolchain, Foundry, solc: only for cargo test - Nargo: only for test:circuits - pnpm, Node, pnpm install: only for non-Rust suites - Enclave contract compilation: only for test:contracts - SDK artifact download: only for test:sdk Made-with: Cursor --- .github/workflows/ci.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7803cba5a2..faf1b4ca1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -536,7 +536,7 @@ jobs: needs: [detect_changes] if: needs.detect_changes.outputs.build_enclave_cli == 'true' timeout-minutes: 20 - runs-on: + runs-on: group: enclave-ci labels: [enclave-ci-runner] permissions: @@ -600,28 +600,41 @@ jobs: submodules: recursive - name: Cache Rust dependencies + if: matrix.test-suite == 'cargo test' uses: ./.github/actions/cache-dependencies with: cargo-lock-path: examples/CRISP/Cargo.lock rust-target-path: examples/CRISP/target/ - name: Install Rust + if: matrix.test-suite == 'cargo test' uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ env.RUST_TOOLCHAIN }} - name: Install Foundry + if: matrix.test-suite == 'cargo test' uses: foundry-rs/foundry-toolchain@v1 + - name: Install solc + if: matrix.test-suite == 'cargo test' + run: | + sudo add-apt-repository ppa:ethereum/ethereum \ + && sudo apt-get update -y \ + && sudo apt-get install -y solc + - name: Install Nargo + if: matrix.test-suite == 'test:circuits' uses: noir-lang/noirup@v0.1.4 with: toolchain: ${{ env.NOIR_TOOLCHAIN }} - name: Setup pnpm + if: matrix.test-suite != 'cargo test' uses: pnpm/action-setup@v4 - name: Setup Node.js + if: matrix.test-suite != 'cargo test' uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} @@ -629,20 +642,17 @@ jobs: cache-dependency-path: pnpm-lock.yaml - name: Install dependencies + if: matrix.test-suite != 'cargo test' working-directory: . run: pnpm install --frozen-lockfile - name: Compile Enclave contracts + if: matrix.test-suite == 'test:contracts' working-directory: . run: pnpm evm:build - - name: Install solc - run: | - sudo add-apt-repository ppa:ethereum/ethereum \ - && sudo apt-get update -y \ - && sudo apt-get install -y solc - - name: Download Crisp SDK artifacts + if: matrix.test-suite == 'test:sdk' uses: actions/download-artifact@v4 with: name: crisp-sdk-artifacts @@ -654,7 +664,7 @@ jobs: crisp_e2e: needs: [detect_changes, build_enclave_cli, build_crisp_sdk] - if: needs.detect_changes.outputs.crisp == 'true' + if: needs.detect_changes.outputs.crisp == 'true' timeout-minutes: 45 runs-on: group: enclave-ci From 014f6845c2aca338adc95ef63c76d2059e1fe194 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Wed, 25 Mar 2026 15:03:35 +0100 Subject: [PATCH 4/5] test: enable proof aggregation for integration tests --- tests/integration/persist.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/persist.sh b/tests/integration/persist.sh index 59c12d6890..20fce089cd 100755 --- a/tests/integration/persist.sh +++ b/tests/integration/persist.sh @@ -69,7 +69,7 @@ pnpm committee:new \ --input-window-end "$INPUT_WINDOW_END" \ --e3-params "$ENCODED_PARAMS" \ --committee-size 0 \ - --proof-aggregation-enabled false + --proof-aggregation-enabled true waiton "$SCRIPT_DIR/output/pubkey.bin" From 6665c67ce9c251656708e66aa665729ad6649088 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Wed, 25 Mar 2026 15:15:32 +0100 Subject: [PATCH 5/5] ci: add sdk and contracts conditions to sdk download step --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faf1b4ca1d..53d7932c4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -652,7 +652,7 @@ jobs: run: pnpm evm:build - name: Download Crisp SDK artifacts - if: matrix.test-suite == 'test:sdk' + if: matrix.test-suite == 'test:sdk' || matrix.test-suite == 'test:contracts' uses: actions/download-artifact@v4 with: name: crisp-sdk-artifacts