Skip to content

Commit

Permalink
chore(workflows): cache build artifacts (#420)
Browse files Browse the repository at this point in the history
* chore(workflows): use sccache

* chore(workflows): cache cargo registry
  • Loading branch information
caugner authored Feb 29, 2024
1 parent a545d66 commit d32d6cf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

steps:
- uses: actions/checkout@v2
- name: Install Rust
Expand All @@ -32,6 +36,16 @@ jobs:
toolchain: 1.76.0
override: true
components: rustfmt, clippy
- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: FMT
run: cargo fmt --all -- --check
- name: Clippy
Expand Down

0 comments on commit d32d6cf

Please sign in to comment.