Skip to content

Commit

Permalink
Cache build artifacts in CI
Browse files Browse the repository at this point in the history
Our CI is somewhat slow, mostly owing to the long time it takes to build
the slew of dependencies we have.
To mitigate this problem, cache build artifacts so that they can be
reused between CI runs.
  • Loading branch information
d-e-s-o committed Dec 1, 2023
1 parent c4cc0bd commit 9ae6899
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.rust }}-${{ matrix.profile }}
- name: Build & test ${{ matrix.profile }}
run: |
cargo build --profile=${{ matrix.profile }} --bins
Expand All @@ -44,6 +47,7 @@ jobs:
- uses: actions/checkout@v4
- name: Install Nightly Rust
uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly -Z minimal-versions update
- name: Install minimum Rust
uses: dtolnay/rust-toolchain@master
Expand All @@ -59,6 +63,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --no-deps --all-targets --all-features --tests -- -A unknown_lints -A deprecated -D warnings
rustfmt:
name: Check code formatting
Expand Down

0 comments on commit 9ae6899

Please sign in to comment.