From e042a7b555ac098c3b83bf313dec740017404306 Mon Sep 17 00:00:00 2001 From: bherbruck Date: Sat, 10 Oct 2026 17:07:18 -0400 Subject: [PATCH] ci: cache native Linux test compilation with sccache (#93) * ci: cache native test compilation with sccache * ci: preserve workflow line endings --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5697ded6..e0fc901d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,17 +98,29 @@ jobs: if: needs.changes.outputs.native == 'true' runs-on: ubuntu-24.04 timeout-minutes: 90 + env: + CARGO_INCREMENTAL: "0" + RUSTC_WRAPPER: sccache + SCCACHE_GHA_ENABLED: "true" + SCCACHE_IGNORE_SERVER_IO_ERROR: "1" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 with: 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 run: cargo test --workspace --profile ci --locked --no-run - name: Run tests # Every test binary at once (cargo test runs them one after another). 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. ci: