refactor: Use SystemTime
for timestamps
#4453
Workflow file for this run
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: I2::Dev::Wasm | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- 'data_model/**.rs' | |
- 'data_model/**.yml' | |
- 'data_model/**.json' | |
- 'data_model/**.toml' | |
- 'smart_contract/**.rs' | |
- 'smart_contract/**.yml' | |
- 'smart_contract/**.json' | |
- 'smart_contract/**.toml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUSTUP_TOOLCHAIN: nightly-2024-04-18 | |
DOCKER_COMPOSE_PATH: defaults | |
jobs: | |
build_executor: | |
runs-on: ubuntu-latest | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-04-18 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build iroha executor | |
run: cargo run --bin iroha_wasm_builder -- build ./wasm_samples/default_executor --optimize --out-file ${{ env.DOCKER_COMPOSE_PATH }}/executor.wasm | |
- name: Upload executor to reuse in other jobs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: executor.wasm | |
path: ${{ env.DOCKER_COMPOSE_PATH }}/executor.wasm | |
retention-days: 1 | |
tests: | |
runs-on: ubuntu-latest | |
needs: build_executor | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-04-18 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Download executor.wasm file | |
uses: actions/download-artifact@v4 | |
with: | |
name: executor.wasm | |
path: ${{ env.DOCKER_COMPOSE_PATH }} | |
- name: Install iroha_wasm_test_runner | |
run: cargo install --path tools/wasm_test_runner | |
- name: Run smart contract tests on WebAssembly VM | |
working-directory: 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 |