From e0eb3c47be53fa0d95010156813689a35dbc0668 Mon Sep 17 00:00:00 2001 From: Jwalin Shah Date: Thu, 23 Apr 2026 17:08:50 -0700 Subject: [PATCH] ci: enable sccache and disable incremental in rust test job (#866) Co-authored-by: Jwalin Shah --- .github/workflows/test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8bb758ab9..0a917627e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,6 +71,15 @@ jobs: runs-on: ubuntu-22.04 container: image: ghcr.io/tinyhumansai/openhuman_ci:rust-1.93.0 + env: + # Incremental compilation is pointless on fresh CI runners and just wastes + # disk and IO. Swatinem/rust-cache already handles cross-run warmup. + CARGO_INCREMENTAL: "0" + # Route rustc through sccache, backed by the GitHub Actions cache. This + # layers on top of Swatinem/rust-cache (which caches target/) by caching + # individual compilation units across branches. + RUSTC_WRAPPER: sccache + SCCACHE_GHA_ENABLED: "true" steps: - name: Checkout code uses: actions/checkout@v4 @@ -103,6 +112,9 @@ jobs: - name: Install system dependencies (cmake, ALSA, X11) run: apt-get update && apt-get install -y --no-install-recommends cmake libasound2-dev libxdo-dev libxtst-dev libx11-dev libevdev-dev && rm -rf /var/lib/apt/lists/* + - name: Install sccache + uses: mozilla-actions/sccache-action@v0.0.9 + - name: Check formatting (cargo fmt) run: cargo fmt --all -- --check