[gh actions] Cache cargo registry and index

This commit is contained in:
bjorn3 2020-03-13 19:44:50 +01:00
parent 2e5661dae6
commit 014438c614
1 changed files with 14 additions and 2 deletions

View File

@ -26,11 +26,23 @@ jobs:
path: ~/.cargo/bin
key: cargo-installed-crates-${{ matrix.os }}
- name: Cache target dir
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo target dir
uses: actions/cache@v1.1.2
with:
path: target
key: target-dir-${{ matrix.os }}-${{ hashFiles('rust-toolchain') }}
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
- name: Prepare dependencies
run: |