Skip to content

Commit 3b54860

Browse files
marc0oloclaude
andcommitted
fix(ci): install ic-mops and build workspace before icp deploy in examples
Two issues caused all example CI jobs to fail: 1. mops not installed: the motoko canister recipe checks for `mops` on PATH, but the provision scripts only installed icp-cli and ic-wasm. Add ic-mops to the global npm install in provision-linux.sh and provision-darwin.sh. 2. frontend/ic_vetkeys prepare script fails during npm i: the example frontends reference @dfinity/vetkeys as a file: dependency. When npm installs it, it runs the package's `prepare` script (npm run build = tsc && vite build), but the library's own node_modules are missing in a clean CI environment. Fix: add an "Install workspace dependencies" step (npm install at repo root) before each icp deploy step in all example workflows. This pre-builds the workspace so the prepare script succeeds. Note: both issues are invisible locally because developers typically have already run `npm install` at the repo root and have ic-mops installed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c27b67b commit 3b54860

8 files changed

+46
-2
lines changed

.github/workflows/examples-basic-bls-signing.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
- name: Provision Darwin
2929
run: |
3030
bash .github/workflows/provision-darwin.sh
31+
- name: Install workspace dependencies
32+
run: npm install
3133
- name: Deploy Basic BLS Signing Rust Darwin
3234
env:
3335
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -49,6 +51,8 @@ jobs:
4951
node-version: '22'
5052
- name: Provision Linux
5153
run: bash .github/workflows/provision-linux.sh
54+
- name: Install workspace dependencies
55+
run: npm install
5256
- name: Deploy Basic BLS Signing Rust Linux
5357
env:
5458
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -71,6 +75,8 @@ jobs:
7175
- name: Provision Darwin
7276
run: |
7377
bash .github/workflows/provision-darwin.sh
78+
- name: Install workspace dependencies
79+
run: npm install
7480
- name: Deploy Basic BLS Signing Motoko Darwin
7581
env:
7682
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -92,6 +98,8 @@ jobs:
9298
node-version: '22'
9399
- name: Provision Linux
94100
run: bash .github/workflows/provision-linux.sh
101+
- name: Install workspace dependencies
102+
run: npm install
95103
- name: Deploy Basic BLS Signing Motoko Linux
96104
env:
97105
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/examples-basic-ibe.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- name: Provision Darwin
2828
run: |
2929
bash .github/workflows/provision-darwin.sh
30+
- name: Install workspace dependencies
31+
run: npm install
3032
- name: Deploy Basic IBE Rust Darwin
3133
env:
3234
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -48,6 +50,8 @@ jobs:
4850
node-version: '22'
4951
- name: Provision Linux
5052
run: bash .github/workflows/provision-linux.sh
53+
- name: Install workspace dependencies
54+
run: npm install
5155
- name: Deploy Basic IBE Rust Linux
5256
env:
5357
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -70,6 +74,8 @@ jobs:
7074
- name: Provision Darwin
7175
run: |
7276
bash .github/workflows/provision-darwin.sh
77+
- name: Install workspace dependencies
78+
run: npm install
7379
- name: Deploy Basic IBE Motoko Darwin
7480
env:
7581
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -91,6 +97,8 @@ jobs:
9197
node-version: '22'
9298
- name: Provision Linux
9399
run: bash .github/workflows/provision-linux.sh
100+
- name: Install workspace dependencies
101+
run: npm install
94102
- name: Deploy Basic IBE Motoko Linux
95103
env:
96104
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/examples-basic-timelock-ibe.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
- name: Provision Darwin
2929
run: |
3030
bash .github/workflows/provision-darwin.sh
31+
- name: Install workspace dependencies
32+
run: npm install
3133
- name: Deploy Basic Timelock IBE Darwin
3234
env:
3335
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -49,6 +51,8 @@ jobs:
4951
node-version: '22'
5052
- name: Provision Linux
5153
run: bash .github/workflows/provision-linux.sh
54+
- name: Install workspace dependencies
55+
run: npm install
5256
- name: Deploy Basic Timelock IBE Linux
5357
env:
5458
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/examples-encrypted-notes-dapp.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- name: Provision Darwin
2828
run: |
2929
bash .github/workflows/provision-darwin.sh
30+
- name: Install workspace dependencies
31+
run: npm install
3032
- name: Deploy Encrypted Notes Dapp VetKD Darwin
3133
env:
3234
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -45,6 +47,8 @@ jobs:
4547
node-version: '22'
4648
- name: Provision Linux
4749
run: bash .github/workflows/provision-linux.sh
50+
- name: Install workspace dependencies
51+
run: npm install
4852
- name: Deploy Encrypted Notes Dapp VetKD Linux
4953
env:
5054
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -64,6 +68,8 @@ jobs:
6468
- name: Provision Darwin
6569
run: |
6670
bash .github/workflows/provision-darwin.sh
71+
- name: Install workspace dependencies
72+
run: npm install
6773
- name: Deploy Encrypted Notes Dapp VetKD Darwin
6874
env:
6975
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -82,6 +88,8 @@ jobs:
8288
node-version: '22'
8389
- name: Provision Linux
8490
run: bash .github/workflows/provision-linux.sh
91+
- name: Install workspace dependencies
92+
run: npm install
8593
- name: Deploy Encrypted Notes Dapp VetKD Linux
8694
env:
8795
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/examples-password-manager-with-metadata.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
- name: Provision Darwin
3030
run: |
3131
bash .github/workflows/provision-darwin.sh
32+
- name: Install workspace dependencies
33+
run: npm install
3234
- name: Deploy Password Manager With Metadata Darwin
3335
env:
3436
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -50,6 +52,8 @@ jobs:
5052
node-version: '22'
5153
- name: Provision Linux
5254
run: bash .github/workflows/provision-linux.sh
55+
- name: Install workspace dependencies
56+
run: npm install
5357
- name: Deploy Password Manager With Metadata Linux
5458
env:
5559
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -72,6 +76,8 @@ jobs:
7276
- name: Provision Darwin
7377
run: |
7478
bash .github/workflows/provision-darwin.sh
79+
- name: Install workspace dependencies
80+
run: npm install
7581
- name: Deploy Password Manager With Metadata Darwin
7682
env:
7783
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -93,6 +99,8 @@ jobs:
9399
node-version: '22'
94100
- name: Provision Linux
95101
run: bash .github/workflows/provision-linux.sh
102+
- name: Install workspace dependencies
103+
run: npm install
96104
- name: Deploy Password Manager With Metadata Linux
97105
env:
98106
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/examples-password-manager.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
- name: Provision Darwin
3030
run: |
3131
bash .github/workflows/provision-darwin.sh
32+
- name: Install workspace dependencies
33+
run: npm install
3234
- name: Deploy Password Manager Darwin
3335
env:
3436
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -49,6 +51,8 @@ jobs:
4951
node-version: '22'
5052
- name: Provision Linux
5153
run: bash .github/workflows/provision-linux.sh
54+
- name: Install workspace dependencies
55+
run: npm install
5256
- name: Deploy Password Manager Linux
5357
env:
5458
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -70,6 +74,8 @@ jobs:
7074
- name: Provision Darwin
7175
run: |
7276
bash .github/workflows/provision-darwin.sh
77+
- name: Install workspace dependencies
78+
run: npm install
7379
- name: Deploy Password Manager Darwin
7480
env:
7581
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -90,6 +96,8 @@ jobs:
9096
node-version: '22'
9197
- name: Provision Linux
9298
run: bash .github/workflows/provision-linux.sh
99+
- name: Install workspace dependencies
100+
run: npm install
93101
- name: Deploy Password Manager Linux
94102
env:
95103
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/provision-darwin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -ex
66
pushd /tmp
77

88
# Install icp-cli (requires Node.js >=22, set up via actions/setup-node in the workflow).
9-
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
9+
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm ic-mops
1010

1111
# Install rust
1212
curl --location --output install-rustup.sh "https://sh.rustup.rs"

.github/workflows/provision-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -ex
66
pushd /tmp
77

88
# Install icp-cli (requires Node.js >=22, set up via actions/setup-node in the workflow).
9-
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
9+
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm ic-mops
1010

1111
# Install rust
1212
wget --output-document install-rustup.sh "https://sh.rustup.rs"

0 commit comments

Comments
 (0)