ci: cache native Linux test compilation with sccache (#93)
* ci: cache native test compilation with sccache * ci: preserve workflow line endings
This commit is contained in:
1 parent
96ee326424
commit
e042a7b555
1 file changed
+12
@@ -98,17 +98,29 @@ jobs:
|
|||||||
if: needs.changes.outputs.native == 'true'
|
if: needs.changes.outputs.native == 'true'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
|
env:
|
||||||
|
CARGO_INCREMENTAL: "0"
|
||||||
|
RUSTC_WRAPPER: sccache
|
||||||
|
SCCACHE_GHA_ENABLED: "true"
|
||||||
|
SCCACHE_IGNORE_SERVER_IO_ERROR: "1"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
||||||
with:
|
with:
|
||||||
key: native-tests
|
key: native-tests
|
||||||
|
- name: Set up compiler cache
|
||||||
|
uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
|
||||||
|
with:
|
||||||
|
version: v0.16.0
|
||||||
- name: Compile tests
|
- name: Compile tests
|
||||||
run: cargo test --workspace --profile ci --locked --no-run
|
run: cargo test --workspace --profile ci --locked --no-run
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
# Every test binary at once (cargo test runs them one after another).
|
# Every test binary at once (cargo test runs them one after another).
|
||||||
run: cargo xtask test --locked
|
run: cargo xtask test --locked
|
||||||
|
- name: Compiler cache statistics
|
||||||
|
if: always()
|
||||||
|
run: sccache --show-stats
|
||||||
|
|
||||||
# Preserve the existing check name for branch protection, including docs-only PRs.
|
# Preserve the existing check name for branch protection, including docs-only PRs.
|
||||||
ci:
|
ci:
|
||||||
|
|||||||
Reference in new issue
Block a user