From 9f50e0306ecb7bd5ec986aac8ed0acc92ba55c86 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 15:18:44 +0000 Subject: [PATCH 1/8] ci: delete unused wasm-pack action --- .github/actions/install-wasm-pack/action.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/actions/install-wasm-pack/action.yml diff --git a/.github/actions/install-wasm-pack/action.yml b/.github/actions/install-wasm-pack/action.yml deleted file mode 100644 index 75a77f156c..0000000000 --- a/.github/actions/install-wasm-pack/action.yml +++ /dev/null @@ -1,20 +0,0 @@ -# NOTE: there has been a change and the rustwasm org is no more and the repository moved which -# seems to have broken various things so this is an attempt to install directly from the binary download on github -name: 'Install wasm-pack' -description: 'Install wasm-pack from GitHub releases' -inputs: - version: - description: 'wasm-pack version to install' - required: false - default: 'v0.13.1' -runs: - using: 'composite' - steps: - - name: Install wasm-pack - shell: bash - run: | - curl -L https://github.com/drager/wasm-pack/releases/download/${{ inputs.version }}/wasm-pack-${{ inputs.version }}-x86_64-unknown-linux-musl.tar.gz -o wasm-pack.tar.gz - tar -xzf wasm-pack.tar.gz - sudo mv wasm-pack-${{ inputs.version }}-x86_64-unknown-linux-musl/wasm-pack /usr/local/bin/wasm-pack - chmod +x /usr/local/bin/wasm-pack - wasm-pack --version From f4bb476ab8c2c66ce78759ef5087b54f7c426f44 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 15:46:49 +0000 Subject: [PATCH 2/8] ci: cache Rust dependencies --- .github/workflows/ci.yml | 93 ++++++++++++++++++++++++++++++++++------ 1 file changed, 80 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e13ce634e1..3f6aac7507 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,16 @@ jobs: steps: - 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: Install Rust 1.86.0 uses: dtolnay/rust-toolchain@stable with: @@ -77,6 +87,16 @@ jobs: steps: - 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: Install Rust 1.86.0 uses: dtolnay/rust-toolchain@stable with: @@ -200,6 +220,16 @@ jobs: - 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: Install Rust 1.86.0 uses: dtolnay/rust-toolchain@stable with: @@ -262,34 +292,53 @@ jobs: steps: - 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: Install Rust 1.86.0 + uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.86.0 + - name: 'Setup node' uses: actions/setup-node@v4 with: node-version: 22 + - name: pnpm-setup uses: pnpm/action-setup@v4 - - name: Install Rust 1.86.0 - uses: dtolnay/rust-toolchain@stable - with: - toolchain: 1.86.0 + - name: Install Nargo uses: noir-lang/noirup@v0.1.4 with: toolchain: v1.0.0-beta.15 + - name: Cache node modules uses: actions/cache@v4 with: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} + - name: Install solc run: | sudo add-apt-repository ppa:ethereum/ethereum \ && sudo apt-get update -y \ && sudo apt-get install -y solc + - name: 'Install the dependencies' run: 'pnpm install' + - name: 'Lint the code' run: 'pnpm lint' + - name: 'Add lint summary' run: | echo "## Lint results" >> $GITHUB_STEP_SUMMARY @@ -297,11 +346,13 @@ jobs: - name: 'Run prebuild' run: 'pnpm test:integration prebuild' + - name: 'Verify build artifacts exist' run: | echo "Checking for build artifacts:" ls -la target/debug/fake_encrypt || echo "fake_encrypt not found" ls -la target/debug/pack_e3_params || echo "pack_e3_params not found" + - name: 'Upload build artifacts' uses: actions/upload-artifact@v4 with: @@ -379,6 +430,7 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive + - name: Cache Rust dependencies uses: actions/cache@v4 with: @@ -388,26 +440,21 @@ jobs: templates/default/target/ key: rust-deps-${{ hashFiles('**/Cargo.lock') }} restore-keys: rust-deps- + - 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 solc run: | sudo add-apt-repository ppa:ethereum/ethereum \ && sudo apt-get update -y \ && sudo apt-get install -y solc + - name: Build enclave CLI run: cargo install --locked --path crates/cli --bin enclave + - name: Upload enclave binary uses: actions/upload-artifact@v4 with: @@ -423,6 +470,16 @@ jobs: with: submodules: recursive + - 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 Rust 1.86.0 uses: dtolnay/rust-toolchain@stable with: @@ -497,6 +554,16 @@ jobs: with: submodules: recursive + - 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: Prepare test environment run: | mkdir -p $GITHUB_WORKSPACE/examples/CRISP/test-results From d28071a6144dc5875f3e7bb2a57922af95408641 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 16:08:40 +0000 Subject: [PATCH 3/8] ci: cache pnpm store --- .github/workflows/ci.yml | 101 +++++++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f6aac7507..b9dde2b6a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,11 +68,20 @@ jobs: - name: pnpm-setup uses: pnpm/action-setup@v4 - - name: Cache node modules + - 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: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: 'Install the dependencies' run: 'pnpm install' @@ -121,11 +130,20 @@ jobs: - name: pnpm-setup uses: pnpm/action-setup@v4 - - name: Cache node modules + - 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: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - name: 'Install the dependencies' run: 'pnpm install' @@ -244,11 +262,19 @@ jobs: - name: pnpm-setup uses: pnpm/action-setup@v4 - - name: Cache node modules + - 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: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: 'Install the dependencies' run: 'pnpm install' @@ -316,17 +342,25 @@ jobs: - 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: Install Nargo uses: noir-lang/noirup@v0.1.4 with: toolchain: v1.0.0-beta.15 - - name: Cache node modules - uses: actions/cache@v4 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} - - name: Install solc run: | sudo add-apt-repository ppa:ethereum/ethereum \ @@ -378,15 +412,25 @@ jobs: node-version: 22 - 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: Install Rust 1.86.0 uses: dtolnay/rust-toolchain@stable with: toolchain: 1.86.0 - - name: Cache node modules - uses: actions/cache@v4 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} - name: 'Install the dependencies' run: 'pnpm install' - name: 'Download build artifacts' @@ -725,14 +769,19 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - - name: Cache Node dependencies + - 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: | - ~/.pnpm-store - node_modules - key: node-deps-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: node-deps- + 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: From f5ef890d370f31ea58d9da84111702141e7938be Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 16:14:20 +0000 Subject: [PATCH 4/8] ci: use pnpm --frozen-lockfile --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9dde2b6a3..bf01354429 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: 'Install the dependencies' - run: 'pnpm install' + run: 'pnpm install --frozen-lockfile' - name: Checking code format rust run: pnpm rust:lint @@ -145,7 +145,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: 'Install the dependencies' - run: 'pnpm install' + run: 'pnpm install --frozen-lockfile' - name: Checking code format rust run: pnpm rust:lint @@ -277,7 +277,7 @@ jobs: ${{ runner.os }}-pnpm-store- - name: 'Install the dependencies' - run: 'pnpm install' + run: 'pnpm install --frozen-lockfile' - name: 'Lint the code' run: 'pnpm evm:lint' @@ -368,7 +368,7 @@ jobs: && sudo apt-get install -y solc - name: 'Install the dependencies' - run: 'pnpm install' + run: 'pnpm install --frozen-lockfile' - name: 'Lint the code' run: 'pnpm lint' @@ -432,7 +432,7 @@ jobs: with: toolchain: 1.86.0 - name: 'Install the dependencies' - run: 'pnpm install' + run: 'pnpm install --frozen-lockfile' - name: 'Download build artifacts' uses: actions/download-artifact@v4 with: @@ -804,7 +804,7 @@ jobs: targets: wasm32-unknown-unknown - name: Install node dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Build the sdk run: pnpm sdk:build @@ -844,7 +844,7 @@ jobs: with: toolchain: 1.86.0 - name: Install node dependencies - run: pnpm install + run: pnpm install --frozen-lockfile - name: Download enclave binary uses: actions/download-artifact@v4 with: From 1baa0a8e7a77728232b2ce166b778f3884a145fb Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 16:30:23 +0000 Subject: [PATCH 5/8] ci: add build_sdk to ciphernode_integration_test --- .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 bf01354429..bb921c2a48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -397,7 +397,7 @@ jobs: if-no-files-found: error ciphernode_integration_test: - needs: [integration_prebuild, build_enclave_cli] + needs: [integration_prebuild, build_enclave_cli, build_sdk] runs-on: 'ubuntu-latest' strategy: matrix: From 573d4d66f562ee9006326357b2c4c8edcef12f9c Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 16:31:36 +0000 Subject: [PATCH 6/8] ci: align pnpm setup in all jobs --- .github/workflows/ci.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb921c2a48..3fc6546473 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -543,10 +543,7 @@ jobs: node-version: '22' - name: Setup pnpm - uses: pnpm/action-setup@v3 - with: - version: 10.7.1 - run_install: false + uses: pnpm/action-setup@v4 - name: Get pnpm store directory id: pnpm-cache @@ -624,10 +621,7 @@ jobs: node-version: '22' - name: Setup pnpm - uses: pnpm/action-setup@v3 - with: - version: 10.7.1 - run_install: false + uses: pnpm/action-setup@v4 # We must install foundry in order to be able to test anvil - name: Install Foundry @@ -769,6 +763,15 @@ jobs: - 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 @@ -791,12 +794,7 @@ jobs: 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: Setup Rust uses: dtolnay/rust-toolchain@stable with: @@ -891,8 +889,6 @@ jobs: node-version: '22' - name: Install pnpm uses: pnpm/action-setup@v4 - with: - version: 10.7.1 - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: From ef5b20ac1559eb6103dcdc9a9b4a85d4fdc26e6c Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 17:09:28 +0000 Subject: [PATCH 7/8] ci: remove pnpm setup from test_enclave_init --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fc6546473..ba951f7fc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -883,12 +883,6 @@ jobs: runs-on: ubuntu-latest needs: [build_enclave_cli, build_e3_support_dev] steps: - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '22' - - name: Install pnpm - uses: pnpm/action-setup@v4 - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: From ada08f46720a6b91b6b1706a98401d4192023933 Mon Sep 17 00:00:00 2001 From: Cedoor Date: Fri, 5 Dec 2025 18:06:26 +0000 Subject: [PATCH 8/8] fix: add pnpm version to test_enclave_init --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba951f7fc3..0d80a603d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -883,6 +883,16 @@ jobs: runs-on: ubuntu-latest needs: [build_enclave_cli, build_e3_support_dev] steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.7.1 + - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: