From f1250c89c7d897afb054bec4f8f2b658b21697c1 Mon Sep 17 00:00:00 2001 From: Lev Velykoivanenko Date: Fri, 16 Oct 2026 18:22:07 +0200 Subject: [PATCH 1/2] ci: trial zccache in place of rust-cache Windows test jobs spend about 3 minutes compiling workspace crates even with rust-cache restoring dependencies. zccache caches each rustc invocation, workspace crates included, plus a target/ snapshot, so a warm run may skip most of that. The clippy and test jobs use zccache 1.15.4 with its target snapshot and restore fallbacks on. Saves are forced, since the action skips them on pull_request runs by default, and only the first partition per OS saves. CARGO_INCREMENTAL=0 matches what rust-cache set. Timeouts are raised so a cold run finishes and can be measured. Co-authored-by: Claude Opus 5.5 --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d0845250..3131e3cdb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,9 @@ jobs: clippy: name: clippy (${{ matrix.os }}) runs-on: ${{ matrix.os }} - timeout-minutes: 5 + timeout-minutes: 15 + env: + CARGO_INCREMENTAL: 0 strategy: fail-fast: false matrix: @@ -64,13 +66,24 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: clippy - - uses: Swatinem/rust-cache@v2 + - uses: zackees/zccache@1.15.4 + with: + zccache-version: 1.15.4 + shared-key: clippy + cache-target: true + target-restore-fallback: true + save-cache: true - run: cargo clippy --workspace --all-targets -- -D warnings + # Saves the caches; a composite action has no post step to do it. + - if: always() + uses: zackees/zccache/action/cleanup@1.15.4 test: name: test (${{ matrix.os }}${{ matrix.partition && format(', {0}', matrix.partition) || '' }}) runs-on: ${{ matrix.os }} - timeout-minutes: ${{ matrix.os == 'windows-latest' && 15 || 10 }} + timeout-minutes: ${{ matrix.os == 'windows-latest' && 30 || 20 }} + env: + CARGO_INCREMENTAL: 0 strategy: fail-fast: false matrix: @@ -86,7 +99,15 @@ jobs: steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 + # Partitions on one OS build the same artifacts, so the first one saves + # the caches for all of them. + - uses: zackees/zccache@1.15.4 + with: + zccache-version: 1.15.4 + shared-key: test + cache-target: true + target-restore-fallback: true + save-cache: ${{ (!matrix.partition || startsWith(matrix.partition, '1/')) && 'true' || 'false' }} - uses: taiki-e/install-action@nextest # The taskwarrior todo tests run against taskwarrior 3.5 or later, the # release built on the taskchampion devkit embeds, which Homebrew ships. @@ -112,6 +133,8 @@ jobs: - name: Build without default features if: matrix.os != 'windows-latest' && matrix.partition != '2/2' run: cargo build --workspace --no-default-features + - if: always() + uses: zackees/zccache/action/cleanup@1.15.4 postgres: name: postgres todo backend and rules source From f758ea26abccaa2dab97112b46d47aa74ef6e97e Mon Sep 17 00:00:00 2001 From: Lev Velykoivanenko Date: Fri, 16 Oct 2026 18:47:33 +0200 Subject: [PATCH 2/2] ci: restart zccache daemon after windows restore On Windows the action's RUSTC_WRAPPER install probe starts the daemon before the compilation cache is restored, so a warm run hit 0% of the restored entries while Linux and macOS hit 100%. Restarting the daemon after setup tests whether it then serves the restored cache. Co-authored-by: Claude Opus 5.5 --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3131e3cdb..cf888a046 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,10 @@ jobs: cache-target: true target-restore-fallback: true save-cache: true + # The action's Windows install probe starts the daemon before the cache + # restore, so it misses every restored entry until restarted. + - if: runner.os == 'Windows' + run: zccache stop && zccache start - run: cargo clippy --workspace --all-targets -- -D warnings # Saves the caches; a composite action has no post step to do it. - if: always() @@ -108,6 +112,10 @@ jobs: cache-target: true target-restore-fallback: true save-cache: ${{ (!matrix.partition || startsWith(matrix.partition, '1/')) && 'true' || 'false' }} + # The action's Windows install probe starts the daemon before the cache + # restore, so it misses every restored entry until restarted. + - if: runner.os == 'Windows' + run: zccache stop && zccache start - uses: taiki-e/install-action@nextest # The taskwarrior todo tests run against taskwarrior 3.5 or later, the # release built on the taskchampion devkit embeds, which Homebrew ships.