From e3be83abdeace0afa7d184dd6de2ac5f4dab128b Mon Sep 17 00:00:00 2001 From: Miles Liu Date: Fri, 4 Nov 2022 14:07:58 +0800 Subject: [PATCH] CI: add use of Swatinem/rust-cache --- .github/workflows/CICD.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index feceeab06..d67edfffa 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -26,6 +26,8 @@ jobs: rustup set profile minimal rustup toolchain install stable -c "clippy,rustfmt" rustup default stable + - name: Rust cache + uses: Swatinem/rust-cache@v2 - name: Ensure `cargo fmt` has been run run: cargo fmt --check - name: Ensure MSRV is set in `clippy.toml` @@ -45,6 +47,8 @@ jobs: rustup set profile minimal rustup toolchain install ${{ env.MIN_SUPPORTED_RUST_VERSION }} -c clippy rustup default ${{ env.MIN_SUPPORTED_RUST_VERSION }} + - name: Rust cache + uses: Swatinem/rust-cache@v2 - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) run: cargo clippy --locked --all-targets --all-features - name: Run tests @@ -96,6 +100,11 @@ jobs: rustup override set stable rustup target add ${{ matrix.job.target }} + - name: Rust cache + uses: Swatinem/rust-cache@v2 + with: + key: ${{ matrix.job.os }}-${{ matrix.job.target }} + - name: Show version information (Rust, cargo, GCC) shell: bash run: |