From a1bf0193af49a1581a02c0747b30faa01aacbb1f Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Tue, 6 Jul 2021 16:24:47 +0200 Subject: [PATCH] Use the new cache plugin Signed-off-by: Francesco Guardiani --- .github/workflows/rust_tests.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/rust_tests.yml b/.github/workflows/rust_tests.yml index a795d65..43036b8 100644 --- a/.github/workflows/rust_tests.yml +++ b/.github/workflows/rust_tests.yml @@ -32,21 +32,19 @@ jobs: if: matrix.target == 'x86_64-unknown-linux-musl' # Caching stuff - - name: Cache cargo registry - uses: actions/cache@v1 + - uses: actions/cache@v2 with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - name: Cache cargo index - uses: actions/cache@v1 + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-deps-${{ hashFiles('**/Cargo.lock') }} + - uses: actions/cache@v2 with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - - name: Cache cargo build - uses: actions/cache@v1 - with: - path: target - key: ${{ runner.os }}-cargo-build-target-${{ matrix.toolchain }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} + path: | + target/ + key: ${{ runner.os }}-cargo-target-${{ matrix.toolchain }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }}