Skip to content

Commit

Permalink
Merge pull request #957 from dfinity/andriy/exc-1698-canister-snapshots
Browse files Browse the repository at this point in the history
feat: EXC-1698: Add Canister Snapshots example
  • Loading branch information
berestovskyy authored Aug 28, 2024
2 parents 152edd0 + 38f7d3c commit 71c7902
Show file tree
Hide file tree
Showing 13 changed files with 925 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,29 @@
/rust/basic_dao/ @dfinity/testing-verification
/rust/basic_ethereum/ @dfinity/cross-chain-team
/rust/canister-info/ @dfinity/testing-verification
/rust/canister-snapshots/ @dfinity/execution
/rust/canister_logs/ @dfinity/execution
/rust/composite_query/ @dfinity/execution
/rust/counter/ @dfinity/growth
/rust/defi/ @dfinity/div-Crypto
/rust/dip721-nft-container/ @dfinity/sdk
/rust/encrypted-notes-dapp-vetkd/ @dfinity/dept-crypto-library
/rust/encrypted-notes-dapp/ @dfinity/dept-crypto-library
/rust/face-recognition/ @dfinity/runtime
/rust/face-recognition/ @dfinity/execution
/rust/guards/ @dfinity/cross-chain-team
/rust/hello/ @dfinity/sdk
/rust/icp_transfer/ @dfinity/growth
/rust/image-classification/ @dfinity/runtime
/rust/image-classification/ @dfinity/execution
/rust/nft-wallet/ @dfinity/growth
/rust/parallel_calls/ @dfinity/research
/rust/performance_counters/ @dfinity/runtime
/rust/periodic_tasks/ @dfinity/runtime
/rust/performance_counters/ @dfinity/execution
/rust/periodic_tasks/ @dfinity/execution
/rust/pub-sub/ @dfinity/growth
/rust/qrcode/ @dfinity/runtime
/rust/qrcode/ @dfinity/execution
/rust/query_stats/ @dfinity/consensus
/rust/send_http_get/ @dfinity/growth
/rust/send_http_post/ @dfinity/growth
/rust/simd/ @dfinity/runtime
/rust/simd/ @dfinity/execution
/rust/threshold-ecdsa/ @dfinity/dept-crypto-library
/rust/threshold-schnorr/ @dfinity/dept-crypto-library
/rust/token_transfer/ @dfinity/growth
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/rust-canister-snapshots-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: rust-canister-snapshots
on:
push:
branches:
- master
pull_request:
paths:
- rust/canister-snapshots/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/rust-canister-snapshots-example.yaml
- .ic-commit
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-canister-snapshots-example-darwin:
runs-on: macos-12
steps:
- uses: actions/checkout@v1
- name: Provision Darwin
run: DFX_VERSION="0.23.0-beta.3" bash .github/workflows/provision-darwin.sh
- name: Remove networks.json
run: rm -f ~/.config/dfx/networks.json
- name: Rust Canister Snapshots Darwin
run: |
dfx start --background
pushd rust/canister-snapshots
make test
popd
rust-canister-snapshots-example-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Provision Linux
run: DFX_VERSION="0.23.0-beta.3" bash .github/workflows/provision-linux.sh
- name: Remove networks.json
run: rm -f ~/.config/dfx/networks.json
- name: Rust Canister Snapshots Linux
run: |
dfx start --background
pushd rust/canister-snapshots
make test
popd
4 changes: 4 additions & 0 deletions rust/canister-snapshots/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build]
target = ["wasm32-unknown-unknown"]

[target.wasm32-unknown-unknown]
25 changes: 25 additions & 0 deletions rust/canister-snapshots/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Various IDEs and Editors
.vscode/
.idea/
**/*~

# Mac OSX temporary files
.DS_Store
**/.DS_Store

# dfx temporary files
.dfx/

# generated files
**/declarations/

# rust
target/

# frontend code
node_modules/
dist/
.svelte-kit/

# environment variables
.env
Loading

0 comments on commit 71c7902

Please sign in to comment.