Skip to content

Commit

Permalink
ci: group build_executor caches, sweep cache before saving
Browse files Browse the repository at this point in the history
Signed-off-by: Nurzhan Sakén <[email protected]>
  • Loading branch information
nxsaken committed Aug 27, 2024
1 parent 830c98e commit bcd8536
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/iroha2-dev-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
# needed to build smart contracts
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: build_executor
sweep-cache: true
- 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
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/iroha2-dev-pr-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
# needed to build smart contracts
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: build_executor
sweep-cache: true
- 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
Expand All @@ -62,6 +65,8 @@ jobs:
# needed to build smart contracts
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- name: Install iroha_wasm_test_runner
run: cargo install --path tools/wasm_test_runner
- name: Run smart contract tests on WebAssembly VM
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- name: Check genesis.json
if: always()
run: ./scripts/tests/consistency.sh genesis
Expand All @@ -52,6 +54,8 @@ jobs:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- name: Format
run: cargo fmt --all -- --check
- name: Lints without features
Expand Down Expand Up @@ -81,6 +85,9 @@ jobs:
# needed to build smart contracts
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: build_executor
sweep-cache: true
- 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
Expand All @@ -107,6 +114,8 @@ jobs:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: llvm-tools-preview
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- uses: taiki-e/install-action@nextest
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Run unit tests (no default features)
Expand Down Expand Up @@ -154,6 +163,7 @@ jobs:
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
cache-group: integration
- uses: taiki-e/install-action@nextest
- name: Run integration tests, with all features
Expand Down Expand Up @@ -182,6 +192,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
cache-group: integration
- uses: taiki-e/install-action@nextest
- name: Run integration tests, with all features
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/iroha2-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
# needed to build smart contracts
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: build_executor
sweep-cache: true
- 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
Expand Down Expand Up @@ -97,6 +100,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- name: Run debug tests and save telemetry
env:
TELEMETRY_FILE: ../target/telemetry/debug.json.lz4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/iroha2-pr-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- uses: taiki-e/install-action@nextest
- name: Run UI tests, with ${{ matrix.feature_flag }}
run: cargo nextest run --no-fail-fast -E 'test(ui)' --${{ matrix.feature_flag }}
3 changes: 3 additions & 0 deletions .github/workflows/iroha2-profiling-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
# needed to build smart contracts
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: build_executor
sweep-cache: true
- 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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/iroha2-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
# needed to build smart contracts
components: rust-src
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: build_executor
sweep-cache: true
- 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
Expand Down

0 comments on commit bcd8536

Please sign in to comment.