Cache based on Cargo.lock.

This commit is contained in:
Sebastian Pütz
2020-08-03 14:19:13 +02:00
committed by Anthony MOI
parent ee64381254
commit 1f64761480
3 changed files with 3 additions and 15 deletions

View File

@ -31,7 +31,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Install Node 12.x
uses: actions/setup-node@v1

View File

@ -88,13 +88,13 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache Cargo Build Target
uses: actions/cache@v1
with:
path: ./bindings/python/target
key: ${{ runner.os }}-cargo-python-build-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-cargo-python-build-${{ hashFiles('**/Cargo.lock') }}
- name: Lint with RustFmt
uses: actions-rs/cargo@v1

View File

@ -29,18 +29,6 @@ jobs:
- if: matrix.os == 'ubuntu-latest'
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache Cargo Registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
- name: Cache Cargo Build Target
uses: actions/cache@v1
with:
path: tokenizers/target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.toml') }}
- name: Build
uses: actions-rs/cargo@v1
with: