Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 485dc07288 | |||
| 52b0c53846 |
@@ -89,19 +89,16 @@ jobs:
|
|||||||
rustup component add rustfmt clippy
|
rustup component add rustfmt clippy
|
||||||
cargo --version && cargo fmt --version && cargo clippy --version
|
cargo --version && cargo fmt --version && cargo clippy --version
|
||||||
|
|
||||||
# Keyed on Cargo.lock: dependency builds are reused until a dep actually
|
# Dependency builds are reused until a dep actually changes; a cache miss
|
||||||
# changes. A cache miss only makes the run slower, never wrong.
|
# only makes the run slower, never wrong. rust-cache rather than a plain
|
||||||
- name: Cache cargo registry and build dir
|
# actions/cache of target/: it strips this crate's own artifacts and
|
||||||
|
# anything stale before saving, and saves only on a miss. The plain cache
|
||||||
|
# restored the previous target/ and re-saved all of it under every new
|
||||||
|
# Cargo.lock, so each entry carried every older build and the runner's
|
||||||
|
# cache grew without bound.
|
||||||
|
- name: Cache cargo registry and dependency builds
|
||||||
if: ${{ steps.detect.outputs.crate == 'true' }}
|
if: ${{ steps.detect.outputs.crate == 'true' }}
|
||||||
uses: actions/cache@v4
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
# Cheapest gate first — parses only, no compile, so a formatting slip
|
# Cheapest gate first — parses only, no compile, so a formatting slip
|
||||||
# fails in seconds instead of after a full build.
|
# fails in seconds instead of after a full build.
|
||||||
|
|||||||
Reference in New Issue
Block a user