fix(actions): use rust-cache action (#1974)

I think the CI failures we've been seeing lately are due to bad incremental compilation artifacts being cached. The rust-cache action is smarter about what it actually caches.
This commit is contained in:
Austin Bonander 2022-07-14 00:44:01 -07:00 committed by GitHub
parent b9a8f90b0c
commit 60cc7c98fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,13 +43,9 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
- uses: actions/cache@v2 - uses: Swatinem/rust-cache@v1
with: with:
path: | key: ${{ runner.os }}-check-${{ matrix.runtime }}-${{ matrix.tls }}
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-check-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
@ -82,13 +78,9 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
- uses: actions/cache@v2 - uses: Swatinem/rust-cache@v1
with: with:
path: | key: ${{ runner.os }}-test
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
@ -127,13 +119,9 @@ jobs:
target: ${{ matrix.target }} target: ${{ matrix.target }}
override: true override: true
- uses: actions/cache@v2 - uses: Swatinem/rust-cache@v1
with: with:
path: | key: ${{ runner.os }}-cli
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cli-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
@ -162,13 +150,9 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
- uses: actions/cache@v2 - uses: Swatinem/rust-cache@v1
with: with:
path: | key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
@ -199,13 +183,9 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
- uses: actions/cache@v2 - uses: Swatinem/rust-cache@v1
with: with:
path: | key: ${{ runner.os }}-postgres-${{ matrix.runtime }}-${{ matrix.tls }}
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-postgres-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
env: env:
@ -263,13 +243,9 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
- uses: actions/cache@v2 - uses: Swatinem/rust-cache@v1
with: with:
path: | key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
@ -307,14 +283,9 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
# same Cargo features as MySQL so the same cache can be used - uses: Swatinem/rust-cache@v1
- uses: actions/cache@v2
with: with:
path: | key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
@ -352,12 +323,8 @@ jobs:
toolchain: stable toolchain: stable
override: true override: true
- uses: actions/cache@v2 - uses: Swatinem/rust-cache@v1
with: with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mssql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-mssql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1