Skip to content

Commit

Permalink
ci: use Leafwing-Studios/cargo-cache
Browse files Browse the repository at this point in the history
`Swatinem/rust-cache` seems to not work, never hits the cache

Signed-off-by: Nurzhan Sakén <[email protected]>
  • Loading branch information
nxsaken committed Aug 27, 2024
1 parent a2337e8 commit 830c98e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-dev-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-dev-pr-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-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
Expand All @@ -61,7 +61,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
- name: Install iroha_wasm_test_runner
run: cargo install --path tools/wasm_test_runner
- name: Run smart contract tests on WebAssembly VM
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
- name: Check genesis.json
if: always()
run: ./scripts/tests/consistency.sh genesis
Expand All @@ -51,7 +51,7 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
- name: Format
run: cargo fmt --all -- --check
- name: Lints without features
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-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
Expand All @@ -106,7 +106,7 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
- 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 @@ -152,7 +152,9 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: integration
- uses: taiki-e/install-action@nextest
- name: Run integration tests, with all features
run: >
Expand All @@ -178,7 +180,9 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
targets: aarch64-apple-darwin,wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
with:
cache-group: integration
- uses: taiki-e/install-action@nextest
- name: Run integration tests, with all features
run: >
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/iroha2-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-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
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
image: hyperledger/iroha2-ci:nightly-2024-04-18
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
- name: Run debug tests and save telemetry
env:
TELEMETRY_FILE: ../target/telemetry/debug.json.lz4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-pr-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-cache@v2
- 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 }}
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-profiling-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iroha2-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
targets: aarch64-apple-darwin,wasm32-unknown-unknown
# needed to build smart contracts
components: rust-src
- uses: Swatinem/rust-cache@v2
- uses: Leafwing-Studios/cargo-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
Expand Down

0 comments on commit 830c98e

Please sign in to comment.