Skip to content

Commit 9f23f62

Browse files
Merge pull request #1249 from dfinity/mwe/snapshot
feat: Add snapshot download example
2 parents 3c10b4f + 8e716bb commit 9f23f62

File tree

13 files changed

+826
-0
lines changed

13 files changed

+826
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
/rust/backend_wasm64/ @dfinity/sdk
6161
/rust/canister-info/ @dfinity/execution
6262
/rust/canister-snapshots/ @dfinity/execution
63+
/rust/canister-snapshot-download/ @dfinity/execution
6364
/rust/canister_logs/ @dfinity/execution
6465
/rust/composite_query/ @dfinity/execution
6566
/rust/counter/ @dfinity/growth
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: rust-canister-snapshot-download
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- rust/canister-snapshot-download/**
9+
- .github/workflows/provision-darwin.sh
10+
- .github/workflows/provision-linux.sh
11+
- .github/workflows/rust-canister-snapshot-download-example.yaml
12+
- .ic-commit
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
jobs:
17+
rust-canister-snapshot-download-example-darwin:
18+
runs-on: macos-15
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Provision Darwin
22+
run: 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-snapshot-download
29+
# ./run.sh # enable when download feature is out of beta
30+
popd
31+
rust-canister-snapshot-download-example-linux:
32+
runs-on: ubuntu-22.04
33+
steps:
34+
- uses: actions/checkout@v1
35+
- name: Provision Linux
36+
run: 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-snapshot-download
43+
# ./run.sh # enable when download feature is out of beta
44+
popd
Lines changed: 4 additions & 0 deletions
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]
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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
26+
27+
snapshots/

0 commit comments

Comments
 (0)