Skip to content

Commit f86cf5b

Browse files
committed
ci: update GitHub Actions workflows for icp-cli
Update all CI workflows to use icp-cli instead of dfx, add ICP_CLI_GITHUB_TOKEN for rate limiting, and add Node.js 22 setup. - Replace dfx commands with icp equivalents in all example workflows - Add ICP_CLI_GITHUB_TOKEN env var to icp steps - Add actions/setup-node for Node.js 22 - Simplify provision scripts (remove dfx installation) - Add .icp to .gitignore
1 parent 46b6dfb commit f86cf5b

12 files changed

+205
-81
lines changed

.github/workflows/backend-motoko.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
- name: Provision Linux
3131
run: bash .github/workflows/provision-linux.sh
3232
- name: Run MOPS Test Linux
33+
env:
34+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3335
run: |
3436
set -eExuo pipefail
3537
cd backend/mo/ic_vetkeys
@@ -51,6 +53,8 @@ jobs:
5153
- name: Provision Darwin
5254
run: bash .github/workflows/provision-darwin.sh
5355
- name: Run MOPS Test Darwin
56+
env:
57+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5458
run: |
5559
set -eExuo pipefail
5660
cd backend/mo/ic_vetkeys

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

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,29 @@ on:
1515
concurrency:
1616
group: ${{ github.workflow }}-${{ github.ref }}
1717
cancel-in-progress: true
18-
env:
19-
DFX_VERSION: 0.29.1
2018
jobs:
2119
examples-basic-bls-signing-rust-darwin:
2220
runs-on: macos-15
2321
steps:
2422
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2523
with:
2624
persist-credentials: false
25+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
26+
with:
27+
node-version: '22'
2728
- name: Provision Darwin
2829
run: |
2930
bash .github/workflows/provision-darwin.sh
31+
- name: Install workspace dependencies
32+
run: npm install
3033
- name: Deploy Basic BLS Signing Rust Darwin
34+
env:
35+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3136
run: |
3237
set -eExuo pipefail
3338
cargo install candid-extractor
3439
pushd examples/basic_bls_signing/rust
35-
dfx start --background && dfx deploy
40+
icp network start -d && icp deploy
3641
cd frontend
3742
npm run lint
3843
examples-basic-bls-signing-rust-linux:
@@ -41,14 +46,21 @@ jobs:
4146
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4247
with:
4348
persist-credentials: false
49+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
50+
with:
51+
node-version: '22'
4452
- name: Provision Linux
4553
run: bash .github/workflows/provision-linux.sh
54+
- name: Install workspace dependencies
55+
run: npm install
4656
- name: Deploy Basic BLS Signing Rust Linux
57+
env:
58+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4759
run: |
4860
set -eExuo pipefail
4961
cargo install candid-extractor
5062
pushd examples/basic_bls_signing/rust
51-
dfx start --background && dfx deploy
63+
icp network start -d && icp deploy
5264
cd frontend
5365
npm run lint
5466
examples-basic-bls-signing-motoko-darwin:
@@ -57,15 +69,22 @@ jobs:
5769
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
5870
with:
5971
persist-credentials: false
72+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
73+
with:
74+
node-version: '22'
6075
- name: Provision Darwin
6176
run: |
6277
bash .github/workflows/provision-darwin.sh
78+
- name: Install workspace dependencies
79+
run: npm install
6380
- name: Deploy Basic BLS Signing Motoko Darwin
81+
env:
82+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6483
run: |
6584
set -eExuo pipefail
6685
cargo install candid-extractor
6786
pushd examples/basic_bls_signing/motoko
68-
dfx start --background && dfx deploy
87+
icp network start -d && icp deploy
6988
cd frontend
7089
npm run lint
7190
examples-basic-bls-signing-motoko-linux:
@@ -74,13 +93,20 @@ jobs:
7493
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
7594
with:
7695
persist-credentials: false
96+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
97+
with:
98+
node-version: '22'
7799
- name: Provision Linux
78100
run: bash .github/workflows/provision-linux.sh
101+
- name: Install workspace dependencies
102+
run: npm install
79103
- name: Deploy Basic BLS Signing Motoko Linux
104+
env:
105+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80106
run: |
81107
set -eExuo pipefail
82108
cargo install candid-extractor
83109
pushd examples/basic_bls_signing/motoko
84-
dfx start --background && dfx deploy
110+
icp network start -d && icp deploy
85111
cd frontend
86112
npm run lint

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

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,29 @@ on:
1414
concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
17-
env:
18-
DFX_VERSION: 0.29.1
1917
jobs:
2018
examples-basic-ibe-rust-darwin:
2119
runs-on: macos-15
2220
steps:
2321
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2422
with:
2523
persist-credentials: false
24+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
25+
with:
26+
node-version: '22'
2627
- name: Provision Darwin
2728
run: |
2829
bash .github/workflows/provision-darwin.sh
30+
- name: Install workspace dependencies
31+
run: npm install
2932
- name: Deploy Basic IBE Rust Darwin
33+
env:
34+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3035
run: |
3136
set -eExuo pipefail
3237
cargo install candid-extractor
3338
pushd examples/basic_ibe/rust
34-
dfx start --background && dfx deploy
39+
icp network start -d && icp deploy
3540
cd frontend
3641
npm run lint
3742
examples-basic-ibe-rust-linux:
@@ -40,14 +45,21 @@ jobs:
4045
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4146
with:
4247
persist-credentials: false
48+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
49+
with:
50+
node-version: '22'
4351
- name: Provision Linux
4452
run: bash .github/workflows/provision-linux.sh
53+
- name: Install workspace dependencies
54+
run: npm install
4555
- name: Deploy Basic IBE Rust Linux
56+
env:
57+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4658
run: |
4759
set -eExuo pipefail
4860
cargo install candid-extractor
4961
pushd examples/basic_ibe/rust
50-
dfx start --background && dfx deploy
62+
icp network start -d && icp deploy
5163
cd frontend
5264
npm run lint
5365
examples-basic-ibe-motoko-darwin:
@@ -56,15 +68,22 @@ jobs:
5668
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
5769
with:
5870
persist-credentials: false
71+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
72+
with:
73+
node-version: '22'
5974
- name: Provision Darwin
6075
run: |
6176
bash .github/workflows/provision-darwin.sh
77+
- name: Install workspace dependencies
78+
run: npm install
6279
- name: Deploy Basic IBE Motoko Darwin
80+
env:
81+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6382
run: |
6483
set -eExuo pipefail
6584
cargo install candid-extractor
6685
pushd examples/basic_ibe/motoko
67-
dfx start --background && dfx deploy
86+
icp network start -d && icp deploy
6887
cd frontend
6988
npm run lint
7089
examples-basic-ibe-motoko-linux:
@@ -73,13 +92,20 @@ jobs:
7392
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
7493
with:
7594
persist-credentials: false
95+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
96+
with:
97+
node-version: '22'
7698
- name: Provision Linux
7799
run: bash .github/workflows/provision-linux.sh
100+
- name: Install workspace dependencies
101+
run: npm install
78102
- name: Deploy Basic IBE Motoko Linux
103+
env:
104+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79105
run: |
80106
set -eExuo pipefail
81107
cargo install candid-extractor
82108
pushd examples/basic_ibe/motoko
83-
dfx start --background && dfx deploy
109+
icp network start -d && icp deploy
84110
cd frontend
85-
npm run lint
111+
npm run lint

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,22 @@ jobs:
2222
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2323
with:
2424
persist-credentials: false
25+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
26+
with:
27+
node-version: '22'
2528
- name: Provision Darwin
2629
run: |
2730
bash .github/workflows/provision-darwin.sh
31+
- name: Install workspace dependencies
32+
run: npm install
2833
- name: Deploy Basic Timelock IBE Darwin
34+
env:
35+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2936
run: |
3037
set -eExuo pipefail
3138
cargo install candid-extractor
3239
pushd examples/basic_timelock_ibe
33-
dfx start --background && dfx deploy
40+
icp network start -d && icp deploy
3441
cd frontend
3542
npm run lint
3643
examples-basic-timelock-ibe-rust-linux:
@@ -39,13 +46,20 @@ jobs:
3946
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4047
with:
4148
persist-credentials: false
49+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
50+
with:
51+
node-version: '22'
4252
- name: Provision Linux
4353
run: bash .github/workflows/provision-linux.sh
54+
- name: Install workspace dependencies
55+
run: npm install
4456
- name: Deploy Basic Timelock IBE Linux
57+
env:
58+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4559
run: |
4660
set -eExuo pipefail
4761
cargo install candid-extractor
4862
pushd examples/basic_timelock_ibe
49-
dfx start --background && dfx deploy
63+
icp network start -d && icp deploy
5064
cd frontend
51-
npm run lint
65+
npm run lint

.github/workflows/examples-encrypted-chat.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
runs-on: macos-15
2121
steps:
2222
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
23+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
24+
with:
25+
node-version: '22'
2326
- name: Provision Darwin
2427
run: |
2528
bash .github/workflows/provision-darwin.sh
@@ -32,6 +35,9 @@ jobs:
3235
runs-on: ubuntu-24.04
3336
steps:
3437
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
38+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
39+
with:
40+
node-version: '22'
3541
- name: Provision Linux
3642
run: bash .github/workflows/provision-linux.sh
3743
- name: Backend Tests Encrypted Chat Rust Linux

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

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,60 +14,86 @@ on:
1414
concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
17-
env:
18-
DFX_VERSION: 0.29.1
1917
jobs:
2018
examples-encrypted-notes-dapp-rust-darwin:
2119
runs-on: macos-15
2220
steps:
2321
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2422
with:
2523
persist-credentials: false
24+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
25+
with:
26+
node-version: '22'
2627
- name: Provision Darwin
2728
run: |
2829
bash .github/workflows/provision-darwin.sh
30+
- name: Install workspace dependencies
31+
run: npm install
2932
- name: Deploy Encrypted Notes Dapp VetKD Darwin
33+
env:
34+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3035
run: |
3136
set -eExuo pipefail
3237
cd examples/encrypted_notes_dapp_vetkd/rust
33-
dfx start --background && dfx deploy
38+
icp network start -d && icp deploy
3439
examples-encrypted-notes-dapp-rust-linux:
3540
runs-on: ubuntu-24.04
3641
steps:
3742
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
3843
with:
3944
persist-credentials: false
45+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
46+
with:
47+
node-version: '22'
4048
- name: Provision Linux
4149
run: bash .github/workflows/provision-linux.sh
50+
- name: Install workspace dependencies
51+
run: npm install
4252
- name: Deploy Encrypted Notes Dapp VetKD Linux
53+
env:
54+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4355
run: |
4456
set -eExuo pipefail
4557
cd examples/encrypted_notes_dapp_vetkd/rust
46-
dfx start --background && dfx deploy
58+
icp network start -d && icp deploy
4759
examples-encrypted-notes-dapp-motoko-darwin:
4860
runs-on: macos-15
4961
steps:
5062
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
5163
with:
5264
persist-credentials: false
65+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
66+
with:
67+
node-version: '22'
5368
- name: Provision Darwin
5469
run: |
5570
bash .github/workflows/provision-darwin.sh
71+
- name: Install workspace dependencies
72+
run: npm install
5673
- name: Deploy Encrypted Notes Dapp VetKD Darwin
74+
env:
75+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5776
run: |
5877
set -eExuo pipefail
5978
cd examples/encrypted_notes_dapp_vetkd/motoko
60-
dfx start --background && dfx deploy
79+
icp network start -d && icp deploy
6180
examples-encrypted-notes-dapp-motoko-linux:
6281
runs-on: ubuntu-24.04
6382
steps:
6483
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
6584
with:
6685
persist-credentials: false
86+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
87+
with:
88+
node-version: '22'
6789
- name: Provision Linux
6890
run: bash .github/workflows/provision-linux.sh
91+
- name: Install workspace dependencies
92+
run: npm install
6993
- name: Deploy Encrypted Notes Dapp VetKD Linux
94+
env:
95+
ICP_CLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7096
run: |
7197
set -eExuo pipefail
7298
cd examples/encrypted_notes_dapp_vetkd/motoko
73-
dfx start --background && dfx deploy
99+
icp network start -d && icp deploy

0 commit comments

Comments
 (0)