diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-04-22 20:17:00 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 07:17:00 -0400 |
commit | b3013c1f95c5d3852bebcae76e13baad00925a0b (patch) | |
tree | b559d602749ce2fc6b43f8ff38f5df6e555625d8 | |
parent | b837fc300d5f31cf2628e81d59e388286493ce71 (diff) |
ci: separate cache for cargo home and build output (#10306)
-rw-r--r-- | .github/workflows/ci.yml | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87886b7cc..430098670 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,17 +167,24 @@ jobs: brew install gnu-tar echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - - name: Cache + - name: Cache Cargo home + uses: actions/cache@v2 + with: + # See https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci + path: | + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git/db + key: + a-cargo-home-${{ matrix.os }}-${{ hashFiles('Cargo.lock') }} + + - name: Cache build output uses: actions/cache@v2 with: path: | - ~/.cargo/git - ~/.cargo/registry ./target key: - d-${{ matrix.os }}-${{ matrix.kind }}-${{ hashFiles('Cargo.lock') }} - restore-keys: | - d-${{ matrix.os }}-${{ matrix.kind }}- + d-${{ matrix.os }}-${{ matrix.kind }}-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('Cargo.lock') }} - name: Apply and update mtime cache uses: ./.github/mtime_cache |