From 87b857705c1e6ddfcb7c6d3ae63b992f3452591d Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 28 May 2020 02:32:29 +0900 Subject: [PATCH] Update `actions/cache` to v2 --- .github/workflows/linux.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7971e590..d55ce1c1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -29,18 +29,16 @@ jobs: uses: actions-rs/cargo@v1 with: command: generate-lockfile - - name: Cache cargo registry - uses: actions/cache@v1 + - name: Cache cargo dirs + uses: actions/cache@v2 with: - path: ~/.cargo/registry - key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} - - name: Cache cargo index - uses: actions/cache@v1 - with: - path: ~/.cargo/git - key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} + path: + ~/.cargo/registry + ~/.cargo/git + ~/.cargo/bin + key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-trimmed-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: target key: ${{ matrix.version }}-x86_64-unknown-linux-gnu-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} @@ -61,7 +59,7 @@ jobs: - name: Generate coverage file if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request') run: | - cargo install cargo-tarpaulin + which cargo-tarpaulin || cargo install cargo-tarpaulin cargo tarpaulin --out Xml --workspace --all-features - name: Upload to Codecov @@ -72,5 +70,5 @@ jobs: - name: Clear the cargo caches run: | - cargo install cargo-cache --no-default-features --features ci-autoclean + which cargo-cache || cargo install cargo-cache --no-default-features --features ci-autoclean cargo-cache