Skip to content

chore: speed up ci workflow#1082

Merged
ctrlc03 merged 8 commits into
mainfrom
ci/improvements
Dec 11, 2025
Merged

chore: speed up ci workflow#1082
ctrlc03 merged 8 commits into
mainfrom
ci/improvements

Conversation

@cedoor

@cedoor cedoor commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Optimized CI by centralizing Rust and pnpm store caching across many jobs to speed up and stabilize builds.
    • Switched to a pnpm store–based caching pattern, ensured cache setup runs before dependency installation, and enforced deterministic installs with frozen lockfiles.
    • Removed an obsolete CI helper that installed a third‑party tool and adjusted job ordering and dependencies to align with the new caching flow.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel

vercel Bot commented Dec 5, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
crisp Ready Ready Preview Comment Dec 11, 2025 8:48pm
enclave-docs Ready Ready Preview Comment Dec 11, 2025 8:48pm

@coderabbitai

coderabbitai Bot commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Removed a composite GitHub Action that installed wasm-pack and converted many CI jobs to pnpm store-based caching plus centralized Rust dependency (Cargo) caching, with cache-restore steps moved before deterministic installs.

Changes

Cohort / File(s) Summary
Removed composite action
\.github/actions/install-wasm-pack/action.yml
Deleted the composite GitHub Action that downloaded, extracted, installed to /usr/local/bin, and verified wasm-pack (default v0.13.1) using curl/tar/chmod and a version check.
CI workflow caching & step reordering
\.github/workflows/ci.yml
Added Rust caches for ~/.cargo/registry, ~/.cargo/git, and target/ keyed by Cargo.lock; replaced per-job node_modules caching with pnpm store caching by computing STORE_PATH (pnpm store path) and caching that path keyed by pnpm-lock.yaml; changed installs to pnpm install --frozen-lockfile; reordered steps so caches are restored/initialized before dependency installation. Applied across many jobs (e.g., rust_*, test_*, crisp_*, integration_*, build_*).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify no remaining references to \.github/actions/install-wasm-pack/action.yml in any workflow.
  • Confirm pnpm STORE_PATH resolution and cache key/hash correctness across runner OSes.
  • Check Cargo cache key composition and potential stale-build issues from target/ caching.
  • Review job dependency adjustments (e.g., added dependency build_sdkciphernode_integration_test).

Possibly related PRs

Suggested reviewers

  • 0xjei
  • hmzakhalid

Poem

🐰 I hopped through workflows, caches in my paw,
pnpm stores snug, Cargo crates in a draw.
No more tarball scurries, installs crisp and fast,
I munch a carrot, CI builds breeze past,
🥕 A rabbit's small cheer for caches that last.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: speed up ci workflow' directly and accurately summarizes the main changes in the PR, which focus on optimizing CI performance through improved caching strategies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/improvements

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 721d3f2 and ada08f4.

📒 Files selected for processing (2)
  • .github/actions/install-wasm-pack/action.yml (0 hunks)
  • .github/workflows/ci.yml (19 hunks)
💤 Files with no reviewable changes (1)
  • .github/actions/install-wasm-pack/action.yml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.
📚 Learning: 2025-08-27T13:49:03.811Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.

Applied to files:

  • .github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: crisp_unit
  • GitHub Check: integration_prebuild
  • GitHub Check: build_sdk
  • GitHub Check: build_enclave_cli
  • GitHub Check: rust_integration
  • GitHub Check: test_contracts
  • GitHub Check: rust_unit
  • GitHub Check: test_net
🔇 Additional comments (4)
.github/workflows/ci.yml (4)

37-86: Good: Cache initialization before deterministic installs.

The reordering to place cache steps before dependency installation, combined with pnpm install --frozen-lockfile, ensures faster CI execution and reproducible builds. This aligns well with the PR objective to speed up workflows.


400-400: Correct: Added build_sdk dependency to ciphernode_integration_test.

The addition of build_sdk to the job dependencies (line 400) ensures the SDK artifacts are available before the integration test runs, preventing potential race conditions.


360-360: Verify Noir toolchain version approach.

The workflow pins the Noir toolchain to v1.0.0-beta.15 across all Nargo installations. Based on learnings from previous PRs, the team preference has been to use toolchain: stable for flexibility and easier updates. However, if beta.15 is intentional for compatibility with your circuits, that's valid. Please confirm this is the desired approach.

Also applies to: 536-536, 637-637, 701-701


1-30: No action needed; the wasm-pack removal is safe. The workflow contains no remaining references to wasm-pack installation or the removed install-wasm-pack action. The wasm-pack dependency in crates/wasm/package.json is a standard npm package that will be installed via pnpm during the normal dependency resolution phase, not via a CI action.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cedoor cedoor changed the title ci: delete unused wasm-pack action ci: speed up ci workflow Dec 5, 2025
@cedoor cedoor changed the title ci: speed up ci workflow chore: speed up ci workflow Dec 5, 2025
@cedoor cedoor marked this pull request as ready for review December 5, 2025 16:06

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/ci.yml (3)

381-384: Consider adding Rust caching to ciphernode_integration_test for consistency.

This job installs Rust (lines 381–384) but lacks Rust dependency caching. Even if it primarily downloads prebuilt artifacts, caching Cargo paths would standardize the workflow and accelerate any local builds. Consider adding a cache step to align with other Rust-using jobs.


793-796: Consider adding Rust caching to template_integration and test_enclave_init jobs.

Both jobs install Rust but do not include Rust dependency caching. If these jobs perform any Cargo operations (even if primarily artifact consumers), adding caching would provide consistency and resilience. If Rust is installed purely for toolchain/PATH setup, this is acceptable.

Also applies to: 847-850


278-278: Minor inconsistency: test_net uses actions/setup-node@v4 while other Node setup steps use v3.

Most jobs use actions/setup-node@v3 (lines 64, 117, 240), but test_net uses v4 (line 278). Verify this is intentional or align for consistency.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8aff7c and 248324d.

📒 Files selected for processing (2)
  • .github/actions/install-wasm-pack/action.yml (0 hunks)
  • .github/workflows/ci.yml (8 hunks)
💤 Files with no reviewable changes (1)
  • .github/actions/install-wasm-pack/action.yml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.
📚 Learning: 2025-08-27T13:49:03.811Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.

Applied to files:

  • .github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: crisp_e2e
🔇 Additional comments (3)
.github/workflows/ci.yml (3)

37-45: ✅ Correct Rust caching placement and key strategy.

Cache is appropriately positioned before Rust toolchain installation, enabling artifact reuse across workflow runs. The Cargo.lock hash as cache key is correct for capturing dependency state changes.


90-98: ✅ Consistent Rust caching across multiple jobs.

All Rust-dependent jobs (rust_integration, test_contracts, integration_prebuild, crisp_unit, crisp_e2e) now include standardized caching with matching key patterns and restore-keys. This improves CI runtime predictably.

Also applies to: 223-231, 296-305, 473-481, 557-565


434-442: Verify intent of templates/default/target/ in build_enclave_cli cache.

This job caches templates/default/target/ alongside standard Cargo paths, whereas other jobs cache only target/. The CLI is built from crates/cli (line 456), not templates directory. Clarify if this path is necessary or should align with the standard target/ pattern used elsewhere.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/workflows/ci.yml (2)

37-45: Excellent performance optimization, but significant code duplication across cache blocks.

The caching strategy is sound: Rust cache using Cargo.lock hash and pnpm store-based caching (modern best practice) are properly implemented with good restore-key fallbacks. However, the same cache blocks are repeated across ~9 jobs, introducing maintenance burden.

Optional refactor for maintainability (deferred):

Consider consolidating repeated cache setup into reusable composite actions or a reusable workflow:

  1. Create .github/actions/cache-rust/action.yml to handle Rust dependency caching (parameterized for target path)
  2. Create .github/actions/cache-pnpm/action.yml for consistent pnpm store setup

This would reduce the ~40+ lines of duplication and make future cache strategy updates a single-point change. The trade-off: adds complexity via extra files, but improves long-term maintainability.

Example usage would shrink each job from separate cache steps to:

- uses: ./.github/actions/cache-rust@v1
  with:
    target-path: 'target/' # or 'templates/default/target/' for template jobs
- uses: ./.github/actions/cache-pnpm@v1

Also applies to: 71-83, 99-107, 133-145, 241-249, 265-277, 322-330, 345-357, 416-428, 478-486, 517-525, 601-609, 772-784, 785-793


766-827: Minor: Inconsistent cache step ordering in build_sdk job.

The build_sdk job sets up pnpm cache (lines 772–784) before Rust cache (lines 785–793), while all other jobs follow Rust → pnpm ordering. This is functionally equivalent but reduces consistency. For maintainability, consider aligning with the pattern used in other jobs.

       - uses: actions/checkout@v4
         with:
           submodules: recursive
-      - name: Get pnpm store directory
-        id: pnpm-cache
-        shell: bash
-        run: |
-          echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
-
-      - name: Setup pnpm cache
-        uses: actions/cache@v4
-        with:
-          path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
-          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
-          restore-keys: |
-            ${{ runner.os }}-pnpm-store-
       - name: Cache Rust dependencies
         uses: actions/cache@v4
         with:
           path: |
             ~/.cargo/registry
             ~/.cargo/git
             target/
           key: rust-deps-${{ hashFiles('**/Cargo.lock') }}
           restore-keys: rust-deps-
+      - name: Get pnpm store directory
+        id: pnpm-cache
+        shell: bash
+        run: |
+          echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+      - name: Setup pnpm cache
+        uses: actions/cache@v4
+        with:
+          path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+          restore-keys: |
+            ${{ runner.os }}-pnpm-store-
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 248324d and e5c88c2.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (13 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-27T13:49:03.811Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.

Applied to files:

  • .github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build_e3_support_dev
  • GitHub Check: crisp_unit
  • GitHub Check: integration_prebuild
  • GitHub Check: build_enclave_cli
  • GitHub Check: test_net
  • GitHub Check: test_contracts
  • GitHub Check: rust_unit
  • GitHub Check: rust_integration

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

772-807: Critical: pnpm store path retrieved before pnpm is installed in build_sdk job.

The "Get pnpm store directory" step at line 772–776 runs the command pnpm store path before pnpm is installed by the pnpm/action-setup@v4 action at line 799. This will fail with "command not found" and break the job.

Move the "Get pnpm store directory" step (lines 772–776) to occur after the "Install pnpm" step (line 799). Apply this reordering:

         - uses: actions/checkout@v4
           with:
             submodules: recursive
-        - name: Get pnpm store directory
-          id: pnpm-cache
-          shell: bash
-          run: |
-            echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
-
-        - name: Setup pnpm cache
-          uses: actions/cache@v4
-          with:
-            path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
-            key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
-            restore-keys: |
-              ${{ runner.os }}-pnpm-store-

         - name: Cache Rust dependencies
           uses: actions/cache@v4
           with:
             path: |
               ~/.cargo/registry
               ~/.cargo/git
               target/
             key: rust-deps-${{ hashFiles('**/Cargo.lock') }}
             restore-keys: rust-deps-

         - name: Setup Node.js
           uses: actions/setup-node@v4
           with:
             node-version: '22'

         - name: Install pnpm
           uses: pnpm/action-setup@v4

+        - name: Get pnpm store directory
+          id: pnpm-cache
+          shell: bash
+          run: |
+            echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+        - name: Setup pnpm cache
+          uses: actions/cache@v4
+          with:
+            path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+            key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+            restore-keys: |
+              ${{ runner.os }}-pnpm-store-
+
         - name: Setup Rust
           uses: dtolnay/rust-toolchain@stable
           with:
             toolchain: 1.86.0
             targets: wasm32-unknown-unknown

         - name: Install node dependencies
           run: pnpm install --frozen-lockfile
🧹 Nitpick comments (3)
.github/workflows/ci.yml (3)

37-45: Rust cache key strategy: Multiple jobs share the same key with different target paths.

Several jobs cache Rust dependencies using the same key (rust-deps-${{ hashFiles('**/Cargo.lock') }}) but cache different directory paths—some use target/ while build_enclave_cli (line 484) and build_e3_support_dev (line 745) use templates/default/target/. This approach works but risks cache collisions or stale entries if different build contexts produce incompatible artifacts in a shared cache.

Consider scoping the cache key per job to prevent potential conflicts:

-          key: rust-deps-${{ hashFiles('**/Cargo.lock') }}
+          key: rust-deps-${{ job.name }}-${{ hashFiles('**/Cargo.lock') }}

Alternatively, document this as intentional if the shared cache is verified to be safe across all jobs.

Also applies to: 99-107, 241-249, 322-330, 478-486, 517-525, 601-609, 785-793


359-362: Noir toolchain version remains pinned; consider aligning with learnings on "stable" preference.

The workflow pins noir-lang/noirup to specific versions (e.g., v1.0.0-beta.15 at line 362, 538, 645, 709). According to prior learnings, you prefer using the "stable" toolchain designation and updating the noirup action version to get tooling improvements rather than pinning to specific beta versions.

Consider updating the Noir toolchain configuration to use "stable" and verifying compatibility:

         - name: Install Nargo
           uses: noir-lang/noirup@v0.1.4
           with:
-            toolchain: v1.0.0-beta.15
+            toolchain: stable

Please verify that your circuits build and pass tests with the stable toolchain before merging.

Also applies to: 536-538, 642-645, 706-709


829-847: template_integration job lacks pnpm store caching.

The template_integration job (lines 829–882) does not include pnpm store caching steps, unlike most other jobs in the workflow. If this job performs significant pnpm dependency resolution, adding store caching could improve build speed.

Consider adding pnpm store caching to this job for consistency and potential performance gains:

       - uses: actions/checkout@v4
         with:
           submodules: recursive
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
           node-version: '22'
       - name: Install pnpm
         uses: pnpm/action-setup@v4
+      - name: Get pnpm store directory
+        id: pnpm-cache
+        shell: bash
+        run: |
+          echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+      - name: Setup pnpm cache
+        uses: actions/cache@v4
+        with:
+          path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+          key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+          restore-keys: |
+            ${{ runner.os }}-pnpm-store-
+
       - name: Setup Rust
         uses: dtolnay/rust-toolchain@stable
         with:
           toolchain: 1.86.0
       - name: Install node dependencies
         run: pnpm install --frozen-lockfile
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5c88c2 and cbc2ee9.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (15 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.
📚 Learning: 2025-08-27T13:49:03.811Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.

Applied to files:

  • .github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build_e3_support_dev
  • GitHub Check: crisp_unit
  • GitHub Check: test_net
  • GitHub Check: test_contracts
  • GitHub Check: build_enclave_cli
  • GitHub Check: integration_prebuild
  • GitHub Check: rust_integration
  • GitHub Check: rust_unit
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

71-86: pnpm store caching pattern is correctly ordered in most jobs.

The pnpm caching strategy is properly sequenced in jobs like rust_unit, rust_integration, test_contracts, integration_prebuild, ciphernode_integration_test, crisp_unit, and crisp_e2e: pnpm is set up before retrieving the store path and before installation. This enables effective cache hits.

Also applies to: 133-148, 265-280, 345-371, 416-435, 551-568, 651-668

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

827-880: Inconsistent caching: template_integration job missing pnpm cache despite doing pnpm work.

The template_integration job installs pnpm dependencies and runs pnpm compile and pnpm test:integration, but lacks pnpm cache setup. In contrast, similar jobs (e.g., build_sdk at line 775-787, crisp_unit at line 548-560) include pnpm cache blocks. Additionally, this job sets up Rust at line 840-843 but doesn't cache Rust dependencies, further diverging from the established caching pattern.

For consistency and performance, add pnpm cache setup and Rust cache before their respective dependency installs. Apply this diff:

  template_integration:
    runs-on: ubuntu-latest
    needs: [build_enclave_cli, build_e3_support_dev, build_sdk]
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: recursive
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '22'
      - name: Install pnpm
        uses: pnpm/action-setup@v4
+     - name: Get pnpm store directory
+       id: pnpm-cache
+       shell: bash
+       run: |
+         echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+     - name: Setup pnpm cache
+       uses: actions/cache@v4
+       with:
+         path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+         key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+         restore-keys: |
+           ${{ runner.os }}-pnpm-store-
      - name: Setup Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: 1.86.0
+     - name: Cache Rust dependencies
+       uses: actions/cache@v4
+       with:
+         path: |
+           ~/.cargo/registry
+           ~/.cargo/git
+           target/
+         key: rust-deps-${{ hashFiles('**/Cargo.lock') }}
+         restore-keys: rust-deps-
      - name: Install node dependencies
        run: pnpm install --frozen-lockfile
🧹 Nitpick comments (3)
.github/workflows/ci.yml (3)

360-362: Consider using "stable" Noir toolchain if available.

The Noir installations pin to v1.0.0-beta.15. Per learnings from previous PRs, you prefer using the "stable" toolchain variant with noir-lang/noirup when possible. If a stable release is now available, consider updating to toolchain: stable to reduce maintenance burden and get future tooling improvements. However, if beta is intentional for this project, this can be deferred.

Also applies to: 536-538, 637-639, 701-703


430-435: Verify Rust installation necessity in ciphernode_integration_test.

The job installs Rust 1.86.0 at line 430-433 but downloads pre-built artifacts and runs tests with the --no-prebuild flag, suggesting no Rust compilation occurs. If the test script doesn't require Rust compilation, removing the Rust installation step would further improve CI speed. Confirm whether Rust is actually needed by the test suite before considering removal.


298-314: Verify test_net job dependency installation.

The test_net job sets up pnpm but doesn't have an explicit pnpm install step or pnpm cache setup. It runs pnpm test:integration net --no-prebuild directly. Confirm whether the test command implicitly installs dependencies or relies on pre-existing node_modules. If fresh installation is needed per run, add pnpm cache setup and explicit install for consistency with other jobs. Alternatively, document why this job intentionally skips caching.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cbc2ee9 and cf155e1.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (18 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.
📚 Learning: 2025-08-27T13:49:03.811Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.

Applied to files:

  • .github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: test_net
  • GitHub Check: crisp_unit
  • GitHub Check: build_sdk
  • GitHub Check: build_enclave_cli
  • GitHub Check: integration_prebuild
  • GitHub Check: rust_unit
  • GitHub Check: rust_integration
🔇 Additional comments (2)
.github/workflows/ci.yml (2)

37-45: Verify Rust cache key strategy with multiple targets.

The Rust cache key uses hashFiles('**/Cargo.lock') across all jobs, but jobs target different Rust platforms—e.g., test_contracts at line 255 specifies wasm32-unknown-unknown while rust_unit doesn't. If different jobs compile to different targets, they may hit cache misses or use incompatible cached artifacts because the same key is shared.

Confirm that Cargo's target isolation (separate directories per profile/target) handles cross-target caching correctly. If not, consider including the target triple in the cache key.

Also applies to: 99-107, 241-249, 322-330, 478-486, 517-525, 598-606


760-825: Verify wasm-pack installation after composite action removal.

The AI summary mentions removal of a wasm-pack composite action, but the provided workflow changes don't show explicit wasm-pack installation or removal. The build_sdk job compiles WASM artifacts (line 808: pnpm sdk:build), so ensure wasm-pack is still available through pnpm dependencies or as a direct install. If the composite action was removed, confirm the build still succeeds.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
.github/workflows/ci.yml (4)

298-314: Add pnpm cache to test_net job for consistency.

This job runs pnpm test:integration net but lacks pnpm caching, inconsistent with other jobs using the new caching patterns and potentially missing performance optimization.

Add pnpm cache steps before line 310:

      - name: pnpm-setup
        uses: pnpm/action-setup@v4
+     
+     - name: Get pnpm store directory
+       id: pnpm-cache
+       shell: bash
+       run: |
+         echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+     - name: Setup pnpm cache
+       uses: actions/cache@v4
+       with:
+         path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+         key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+         restore-keys: |
+           ${{ runner.os }}-pnpm-store-
+     
      - name: 'Run network tests'
-       run: 'pnpm test:integration net --no-prebuild'
+       run: 'pnpm install --frozen-lockfile && pnpm test:integration net --no-prebuild'

399-435: Add Rust cache to ciphernode_integration_test job.

This job installs Rust toolchain (line 430) but lacks Rust dependency caching, inconsistent with other jobs and potentially missing the performance benefit of this PR.

Add Rust cache steps after line 408 (after checkout):

      - name: 'Check out the repo'
        uses: 'actions/checkout@v4'
+     
+     - name: Cache Rust dependencies
+       uses: actions/cache@v4
+       with:
+         path: |
+           ~/.cargo/registry
+           ~/.cargo/git
+           target/
+         key: rust-deps-${{ hashFiles('**/Cargo.lock') }}
+         restore-keys: rust-deps-
+     
      - name: 'Setup node'

827-845: Add pnpm cache to template_integration job.

This job runs pnpm install --frozen-lockfile but lacks pnpm caching, inconsistent with other jobs and reducing the effectiveness of the caching optimization.

Add pnpm cache steps before line 845:

      - name: Install pnpm
        uses: pnpm/action-setup@v4
+     
+     - name: Get pnpm store directory
+       id: pnpm-cache
+       shell: bash
+       run: |
+         echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+     - name: Setup pnpm cache
+       uses: actions/cache@v4
+       with:
+         path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+         key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+         restore-keys: |
+           ${{ runner.os }}-pnpm-store-
+     
      - name: Setup Rust

882-918: Add pnpm cache to test_enclave_init job.

This job uses pnpm-action-setup but lacks pnpm caching, inconsistent with the new caching patterns introduced across the workflow.

Add pnpm cache steps after line 892:

      - name: Install pnpm
        uses: pnpm/action-setup@v4
        with:
          version: 10.7.1
+     
+     - name: Get pnpm store directory
+       id: pnpm-cache
+       shell: bash
+       run: |
+         echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
+
+     - name: Setup pnpm cache
+       uses: actions/cache@v4
+       with:
+         path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
+         key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
+         restore-keys: |
+           ${{ runner.os }}-pnpm-store-
      
      - name: Setup Rust
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf155e1 and 37aa0aa.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (19 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.
📚 Learning: 2025-08-27T13:49:03.811Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 648
File: .github/workflows/ci.yml:202-206
Timestamp: 2025-08-27T13:49:03.811Z
Learning: In GitHub Actions workflows for Noir circuits, the user prefers to use "stable" toolchain with noir-lang/noirup action rather than pinning to specific versions like 1.0.0-beta.11, and prefers to update the noirup action version (e.g., to 0.1.4) to get tooling improvements.

Applied to files:

  • .github/workflows/ci.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: build_e3_support_dev
  • GitHub Check: build_enclave_cli
  • GitHub Check: crisp_unit
  • GitHub Check: test_net
  • GitHub Check: integration_prebuild
  • GitHub Check: build_sdk
  • GitHub Check: build_ciphernode_image
  • GitHub Check: rust_unit
  • GitHub Check: rust_integration
🔇 Additional comments (1)
.github/workflows/ci.yml (1)

536-539: Consider aligning Noir toolchain with project preferences.

The workflow pins specific Noir versions (e.g., v1.0.0-beta.15 at lines 536–539, 637–639, 701–703) across multiple jobs. Based on learnings from prior reviews, the team prefers using a stable toolchain designation with noirup action to benefit from tooling improvements automatically.

Please verify if this pin to v1.0.0-beta.15 is intentional for this PR, or if it should be updated to stable for consistency with team preferences.

Also applies to: 637-639, 701-703

Comment thread .github/workflows/ci.yml

@ctrlc03 ctrlc03 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE

@ctrlc03 ctrlc03 merged commit ab80318 into main Dec 11, 2025
25 checks passed
@ctrlc03 ctrlc03 deleted the ci/improvements branch December 11, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants