Skip to content

Commit 38f7d3c

Browse files
committed
feat: EXC-1698: Add Canister Snapshots example
1 parent 701dcc5 commit 38f7d3c

File tree

13 files changed

+925
-6
lines changed

13 files changed

+925
-6
lines changed

.github/CODEOWNERS

+7-6
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,29 @@
6161
/rust/basic_dao/ @dfinity/testing-verification
6262
/rust/basic_ethereum/ @dfinity/cross-chain-team
6363
/rust/canister-info/ @dfinity/testing-verification
64+
/rust/canister-snapshots/ @dfinity/execution
6465
/rust/canister_logs/ @dfinity/execution
6566
/rust/composite_query/ @dfinity/execution
6667
/rust/counter/ @dfinity/growth
6768
/rust/defi/ @dfinity/div-Crypto
6869
/rust/dip721-nft-container/ @dfinity/sdk
6970
/rust/encrypted-notes-dapp-vetkd/ @dfinity/dept-crypto-library
7071
/rust/encrypted-notes-dapp/ @dfinity/dept-crypto-library
71-
/rust/face-recognition/ @dfinity/runtime
72+
/rust/face-recognition/ @dfinity/execution
7273
/rust/guards/ @dfinity/cross-chain-team
7374
/rust/hello/ @dfinity/sdk
7475
/rust/icp_transfer/ @dfinity/growth
75-
/rust/image-classification/ @dfinity/runtime
76+
/rust/image-classification/ @dfinity/execution
7677
/rust/nft-wallet/ @dfinity/growth
7778
/rust/parallel_calls/ @dfinity/research
78-
/rust/performance_counters/ @dfinity/runtime
79-
/rust/periodic_tasks/ @dfinity/runtime
79+
/rust/performance_counters/ @dfinity/execution
80+
/rust/periodic_tasks/ @dfinity/execution
8081
/rust/pub-sub/ @dfinity/growth
81-
/rust/qrcode/ @dfinity/runtime
82+
/rust/qrcode/ @dfinity/execution
8283
/rust/query_stats/ @dfinity/consensus
8384
/rust/send_http_get/ @dfinity/growth
8485
/rust/send_http_post/ @dfinity/growth
85-
/rust/simd/ @dfinity/runtime
86+
/rust/simd/ @dfinity/execution
8687
/rust/threshold-ecdsa/ @dfinity/dept-crypto-library
8788
/rust/threshold-schnorr/ @dfinity/dept-crypto-library
8889
/rust/token_transfer/ @dfinity/growth
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: rust-canister-snapshots
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- rust/canister-snapshots/**
9+
- .github/workflows/provision-darwin.sh
10+
- .github/workflows/provision-linux.sh
11+
- .github/workflows/rust-canister-snapshots-example.yaml
12+
- .ic-commit
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
jobs:
17+
rust-canister-snapshots-example-darwin:
18+
runs-on: macos-12
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Provision Darwin
22+
run: DFX_VERSION="0.23.0-beta.3" bash .github/workflows/provision-darwin.sh
23+
- name: Remove networks.json
24+
run: rm -f ~/.config/dfx/networks.json
25+
- name: Rust Canister Snapshots Darwin
26+
run: |
27+
dfx start --background
28+
pushd rust/canister-snapshots
29+
make test
30+
popd
31+
rust-canister-snapshots-example-linux:
32+
runs-on: ubuntu-20.04
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: Provision Linux
36+
run: DFX_VERSION="0.23.0-beta.3" bash .github/workflows/provision-linux.sh
37+
- name: Remove networks.json
38+
run: rm -f ~/.config/dfx/networks.json
39+
- name: Rust Canister Snapshots Linux
40+
run: |
41+
dfx start --background
42+
pushd rust/canister-snapshots
43+
make test
44+
popd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[build]
2+
target = ["wasm32-unknown-unknown"]
3+
4+
[target.wasm32-unknown-unknown]

rust/canister-snapshots/.gitignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Various IDEs and Editors
2+
.vscode/
3+
.idea/
4+
**/*~
5+
6+
# Mac OSX temporary files
7+
.DS_Store
8+
**/.DS_Store
9+
10+
# dfx temporary files
11+
.dfx/
12+
13+
# generated files
14+
**/declarations/
15+
16+
# rust
17+
target/
18+
19+
# frontend code
20+
node_modules/
21+
dist/
22+
.svelte-kit/
23+
24+
# environment variables
25+
.env

0 commit comments

Comments
 (0)