Use the new cache plugin

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
This commit is contained in:
slinkydeveloper 2021-07-06 16:24:47 +02:00 committed by Francesco Guardiani
parent 4cee94c660
commit a1bf0193af
1 changed files with 11 additions and 13 deletions

View File

@ -32,21 +32,19 @@ jobs:
if: matrix.target == 'x86_64-unknown-linux-musl' if: matrix.target == 'x86_64-unknown-linux-musl'
# Caching stuff # Caching stuff
- name: Cache cargo registry - uses: actions/cache@v2
uses: actions/cache@v1
with: with:
path: ~/.cargo/registry path: |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} ~/.cargo/bin/
- name: Cache cargo index ~/.cargo/registry/index/
uses: actions/cache@v1 ~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-deps-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v2
with: with:
path: ~/.cargo/git path: |
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} target/
- name: Cache cargo build key: ${{ runner.os }}-cargo-target-${{ matrix.toolchain }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ matrix.toolchain }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
toolchain: ${{ matrix.toolchain }} toolchain: ${{ matrix.toolchain }}