Skip to content

Commit 6e75ea9

Browse files
Merge pull request #1278 from dfinity/msum/add-workflows-to-examples
chore: Add workflows to the examples
2 parents 0ee1439 + 75037a1 commit 6e75ea9

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: rust-candid-type-generation
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- rust/candid_type_generation/**
9+
- .github/workflows/provision-darwin.sh
10+
- .github/workflows/provision-linux.sh
11+
- .github/workflows/rust-candid-type-generation-example.yml
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
jobs:
16+
rust-candid-type-generation-example-darwin:
17+
runs-on: macos-15
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: Provision Darwin
21+
run: bash .github/workflows/provision-darwin.sh
22+
- name: Candid Type Generation Darwin
23+
run: |
24+
pushd rust/candid_type_generation
25+
rm -rf candid/nns_governance.did src/declarations/nns_governance.rs
26+
./scripts/fetch_candid.sh
27+
cargo build
28+
[ -s "candid/nns_governance.did" ] || exit 1
29+
[ -s "src/declarations/nns_governance.rs" ] || exit 1
30+
popd
31+
rust-candid-type-generation-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: Candid Type Generation Linux
38+
run: |
39+
pushd rust/candid_type_generation
40+
rm -rf candid/nns_governance.did src/declarations/nns_governance.rs
41+
./scripts/fetch_candid.sh
42+
cargo build
43+
[ -s "candid/nns_governance.did" ] || exit 1
44+
[ -s "src/declarations/nns_governance.rs" ] || exit 1
45+
popd
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: rust-unit-testable-rust-canister
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
paths:
8+
- rust/unit_testable_rust_canister/**
9+
- .github/workflows/provision-darwin.sh
10+
- .github/workflows/provision-linux.sh
11+
- .github/workflows/rust-unit-testable-rust-canister-example.yml
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
jobs:
16+
rust-unit-testable-rust-canister-example-darwin:
17+
runs-on: macos-15
18+
steps:
19+
- uses: actions/checkout@v1
20+
- name: Provision Darwin
21+
run: bash .github/workflows/provision-darwin.sh
22+
- name: Rust Unit Testable Rust Canister Darwin
23+
run: |
24+
pushd rust/unit_testable_rust_canister
25+
cargo test
26+
popd
27+
rustunit-testable-rust-canister-example-linux:
28+
runs-on: ubuntu-22.04
29+
steps:
30+
- uses: actions/checkout@v1
31+
- name: Provision Linux
32+
run: bash .github/workflows/provision-linux.sh
33+
- name: Rust Unit Testable Rust Canister Linux
34+
run: |
35+
pushd rust/unit_testable_rust_canister
36+
cargo test
37+
popd
-1.55 MB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)