Skip to content

Commit

Permalink
[CI] update rust cache actions
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Jan 15, 2025
1 parent 2cda391 commit af47189
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,9 @@ jobs:
- name: Setup Rust toolchain
run: rustup show

- name: Cache Rust Dependecies
uses: actions/cache@v3
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
enclave/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
shared-key: "release"

- name: Build
run: cargo build --release
Expand Down Expand Up @@ -75,15 +69,9 @@ jobs:
- name: Setup Rust toolchain
run: rustup show

- name: Cache Rust Dependecies
uses: actions/cache@v3
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
enclave/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
shared-key: "release"

- name: Build
run: cargo build --release --features try-runtime,runtime-benchmarks
Expand Down Expand Up @@ -115,6 +103,7 @@ jobs:
restore-keys: |
srtool-target-${{ matrix.runtime }}-
srtool-target-
- name: Srtool build
id: srtool_build
uses: chevdor/[email protected]
Expand Down Expand Up @@ -188,15 +177,9 @@ jobs:
- name: Setup Rust toolchain
run: rustup show

- name: Cache Rust Dependecies
uses: actions/cache@v3
- uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
enclave/target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
shared-key: "debug"

- name: cargo test
run: cargo test --all
Expand Down Expand Up @@ -235,7 +218,7 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.rust-target }}-${{ matrix.check }}
shared-key: "debug"

- name: ${{ matrix.check }}
run: cargo ${{ matrix.check }}
Expand Down

0 comments on commit af47189

Please sign in to comment.