-
Notifications
You must be signed in to change notification settings - Fork 279
74 lines (64 loc) · 2.35 KB
/
iroha2-dev-pr-wasm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: I2::Dev::Wasm
on:
pull_request:
branches: [main]
paths:
- '.github/workflows/iroha2-dev-pr-wasm.yaml'
- 'crates/iroha_data_model/**.rs'
- 'crates/iroha_data_model/**.yml'
- 'crates/iroha_data_model/**.json'
- 'crates/iroha_data_model/**.toml'
- 'crates/iroha_crypto/**.rs'
- 'crates/iroha_crypto/**.yml'
- 'crates/iroha_crypto/**.json'
- 'crates/iroha_crypto/**.toml'
- 'crates/iroha_smart_contract/**.rs'
- 'crates/iroha_smart_contract/**.yml'
- 'crates/iroha_smart_contract/**.json'
- 'crates/iroha_smart_contract/**.toml'
- 'crates/iroha_executor/**.rs'
- 'crates/iroha_executor/**.yml'
- 'crates/iroha_executor/**.json'
- 'crates/iroha_executor/**.toml'
- 'crates/iroha_trigger/**.rs'
- 'crates/iroha_trigger/**.yml'
- 'crates/iroha_trigger/**.json'
- 'crates/iroha_trigger/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DEFAULTS_DIR: defaults
jobs:
build_executor:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-09-09
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Build wasm libs
run: mold --run cargo run --bin iroha_wasm_builder -- build ./wasm/libs/default_executor --optimize --out-file ${{ env.DEFAULTS_DIR }}/executor.wasm
- name: Upload executor to reuse in other jobs
uses: actions/upload-artifact@v4
with:
name: executor.wasm
path: ${{ env.DEFAULTS_DIR }}/executor.wasm
retention-days: 1
tests:
runs-on: ubuntu-latest
container:
image: hyperledger/iroha2-ci:nightly-2024-09-09
needs: build_executor
steps:
- uses: actions/checkout@v4
- name: Download executor.wasm
uses: actions/download-artifact@v4
with:
name: executor.wasm
path: ${{ env.DEFAULTS_DIR }}
- name: Install iroha_wasm_test_runner
run: which iroha_wasm_test_runner || cargo install --path crates/iroha_wasm_test_runner
- name: Run smart contract tests on WebAssembly VM
working-directory: crates/iroha_smart_contract
run: mold --run cargo test -p iroha_smart_contract -p iroha_smart_contract_utils --release --tests --target wasm32-unknown-unknown --no-fail-fast --quiet