Merge pull request #1053 from dfinity/chore-ic-pos-upgrade #227
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rust-parallel-calls | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
paths: | |
- rust/parallel_calls/** | |
- .github/workflows/provision-darwin.sh | |
- .github/workflows/provision-linux.sh | |
- .github/workflows/rust-parallel-calls-example.yml | |
- .ic-commit | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
rust-parallel-calls-darwin: | |
runs-on: macos-15 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Provision Darwin | |
run: bash .github/workflows/provision-darwin.sh | |
- name: Rust Parallel-Calls Darwin | |
run: | | |
pushd rust/parallel_calls | |
dfx start --background | |
make test | |
popd | |
rust-parallel-calls-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Provision Linux | |
run: bash .github/workflows/provision-linux.sh | |
- name: Rust Parallel-Calls Linux | |
run: | | |
pushd rust/parallel_calls | |
dfx start --background | |
make test | |
popd | |
rust-parallel-calls-pocket-ic-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Provision Linux | |
run: bash .github/workflows/provision-linux.sh | |
- name: Install PocketIC server | |
uses: dfinity/pocketic@main | |
- name: Test parallel calls with PocketIC | |
run: | | |
pushd rust/parallel_calls | |
cargo build --release --target wasm32-unknown-unknown -p callee | |
cargo build --release --target wasm32-unknown-unknown -p caller | |
export CALLER_WASM=$(cargo build --target wasm32-unknown-unknown -p caller --message-format=json \ | |
| jq -r 'select(.reason == "compiler-artifact") | .filenames[] | select(endswith(".wasm"))') | |
export CALLEE_WASM=$(cargo build --target wasm32-unknown-unknown -p callee --message-format=json \ | |
| jq -r 'select(.reason == "compiler-artifact") | .filenames[] | select(endswith(".wasm"))') | |
cargo run | |
popd | |