Use mozilla-actions/sccache-action for caching builds (#169)

This commit is contained in:
Ulyssa 2023-10-20 18:48:06 -07:00 committed by GitHub
parent 3b86be0545
commit 443ad241b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,9 @@ jobs:
matrix: matrix:
platform: [ubuntu-latest, windows-latest, macos-latest] platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -30,11 +33,8 @@ jobs:
with: with:
path: ~/.cargo/registry path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build - name: Run sccache-cache
uses: actions/cache@v3 uses: mozilla-actions/sccache-action@v0.0.3
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
- name: Check formatting - name: Check formatting
run: cargo +nightly fmt --all -- --check run: cargo +nightly fmt --all -- --check
- name: Check Clippy - name: Check Clippy