From 1a9736f8d92151b74040b69e7ef9469b445a0edf Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 12 Oct 2024 23:32:51 -0600 Subject: [PATCH] ci: Add Rust workspace cache --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ec720e..62b6a75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,8 @@ jobs: uses: dtolnay/rust-toolchain@stable with: components: clippy + - name: Cache Rust workspace + uses: Swatinem/rust-cache@v2 - name: Cargo check run: cargo check --all-features --all-targets - name: Cargo clippy @@ -75,6 +77,8 @@ jobs: uses: actions/checkout@v4 - name: Setup Rust toolchain uses: dtolnay/rust-toolchain@stable + - name: Cache Rust workspace + uses: Swatinem/rust-cache@v2 - name: Cargo test run: cargo test --release --all-features @@ -138,6 +142,10 @@ jobs: uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} + - name: Cache Rust workspace + uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.target }} - name: Cargo build run: > cargo ${{ matrix.build }} --profile ${{ env.BUILD_PROFILE }} --target ${{ matrix.target }}