From af4718973f3b3eef79908c3e9c17ebf5ead1f0b1 Mon Sep 17 00:00:00 2001 From: Christian Langenbacher Date: Wed, 15 Jan 2025 12:22:18 +0100 Subject: [PATCH] [CI] update rust cache actions --- .github/workflows/ci.yml | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9249cfcb..da057d49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -115,6 +103,7 @@ jobs: restore-keys: | srtool-target-${{ matrix.runtime }}- srtool-target- + - name: Srtool build id: srtool_build uses: chevdor/srtool-actions@v0.9.2 @@ -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 @@ -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 }}