actions: use Swatinem/rust-cache for simpler build caching

pull/194/head
Jake McGinty 2022-01-31 22:42:26 -06:00
parent 110bace5c7
commit 54131b4447
2 changed files with 2 additions and 27 deletions

View File

@ -24,26 +24,7 @@ jobs:
env:
ACCEPT_EULA: Y
run: sudo apt-get -y update && sudo apt-get install -f && sudo apt-get -y install libsqlite3-dev libclang-9-dev
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo bin
uses: actions/cache@v2
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
- uses: Swatinem/rust-cache@v1
- name: Build
uses: actions-rs/cargo@v1
with:

View File

@ -30,13 +30,7 @@ jobs:
ACCEPT_EULA: Y
run: sudo apt-get -y update && sudo apt-get install -f && sudo apt-get -y install libsqlite3-dev libclang-9-dev
if: contains(runner.os, 'Linux')
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1
- uses: Swatinem/rust-cache@v1
- name: Build
uses: actions-rs/cargo@v1
with: