ci: cache Rust builds with Swatinem/rust-cache to speed up release + CI
This commit is contained in:
@@ -13,6 +13,7 @@ jobs:
|
|||||||
- uses: dtolnay/rust-toolchain@1.86.0
|
- uses: dtolnay/rust-toolchain@1.86.0
|
||||||
with:
|
with:
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo fmt --check
|
- run: cargo fmt --check
|
||||||
# libfreemkv is a library — Cargo.lock is gitignored. --locked
|
# libfreemkv is a library — Cargo.lock is gitignored. --locked
|
||||||
# would always fail on a fresh runner because there's no committed
|
# would always fail on a fresh runner because there's no committed
|
||||||
@@ -25,6 +26,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: dtolnay/rust-toolchain@1.86.0
|
- uses: dtolnay/rust-toolchain@1.86.0
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo test --tests
|
- run: cargo test --tests
|
||||||
|
|
||||||
check-macos:
|
check-macos:
|
||||||
@@ -32,6 +34,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: dtolnay/rust-toolchain@1.86.0
|
- uses: dtolnay/rust-toolchain@1.86.0
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
- run: cargo check
|
- run: cargo check
|
||||||
|
|
||||||
check-windows:
|
check-windows:
|
||||||
@@ -39,6 +42,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: dtolnay/rust-toolchain@1.86.0
|
- uses: dtolnay/rust-toolchain@1.86.0
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
# Build the tests (not just `cargo check`): catches errors in test
|
# Build the tests (not just `cargo check`): catches errors in test
|
||||||
# code and forces full codegen of the Windows-only SPTI transport
|
# code and forces full codegen of the Windows-only SPTI transport
|
||||||
# (src/scsi/windows.rs), which never compiles on the Linux/macOS dev
|
# (src/scsi/windows.rs), which never compiles on the Linux/macOS dev
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: dtolnay/rust-toolchain@1.86.0
|
- uses: dtolnay/rust-toolchain@1.86.0
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
# libfreemkv is a library — Cargo.lock isn't tracked, so --locked
|
# libfreemkv is a library — Cargo.lock isn't tracked, so --locked
|
||||||
# would always fail (no lockfile to lock against on a fresh runner).
|
# would always fail (no lockfile to lock against on a fresh runner).
|
||||||
- run: cargo test
|
- run: cargo test
|
||||||
@@ -49,6 +50,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: dtolnay/rust-toolchain@1.86.0
|
- uses: dtolnay/rust-toolchain@1.86.0
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
# --no-verify: CI already compiled this exact commit (in the `test` job
|
# --no-verify: CI already compiled this exact commit (in the `test` job
|
||||||
# and on every push via ci.yml). cargo publish's default re-verify does a
|
# and on every push via ci.yml). cargo publish's default re-verify does a
|
||||||
# full cold release build of the packaged tarball, which here is pure
|
# full cold release build of the packaged tarball, which here is pure
|
||||||
|
|||||||
Reference in New Issue
Block a user