Conversation
Windows CI rebuilds everything from scratch on every run for one reason: the set-cargo-target-dir anchor sends Linux to $HOME/actions-runner/_work/target, outside the workspace, and everything else to $GITHUB_WORKSPACE/target -- which checkout wipes each run. Windows also never had sccache enabled at all. Point Windows at C:/actions-runner/_work/target and enable sccache there, mirroring the Linux setup already on master. The Windows branch is gated on the runner work directory existing, so GitHub-hosted windows-latest jobs keep their current workspace-local behaviour. RUSTC_WRAPPER is set to an explicit C:/sccache/sccache.exe rather than the result of `command -v`: these steps run under Git Bash, whose `command -v` returns an MSYS path (/c/sccache/sccache.exe) that Cargo, a native Windows process, cannot execute. The `command -v` guard is kept only to detect whether the runner image was warmed, so an unwarmed image degrades to a cold but working build instead of failing. The Windows-only actions/cache entries for rusty_v8 and vendored OpenSSL are deliberately left in place for this iteration. Requires a runner image warmed by warm-cache-windows.ps1 in clockworklabs/infra. Without it these paths are simply empty and builds behave as they do today.
jdetter
marked this pull request as draft
September 16, 2026 04:35
Points upload-build-artifacts-windows, smoketest_build_windows and smoketest_partitions_windows at spacetimedb-windows-runner-staging so this PR can be qualified against runner image vm26, which carries the warmed sccache store and dependency-only Cargo target. This commit exists only to measure the effect and MUST be reverted before merge. Leaving it in would send all production Windows CI to the staging pool. The windows-latest matrix in the update-flow job is deliberately untouched -- it runs on GitHub-hosted runners and has no warmed image. Revert with: git revert <this commit>
jdetter
marked this pull request as ready for review
September 22, 2026 03:38
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Disclaimer: The PR contents and most of the description were written by AI but reviewed by me before opening for review.
Make Windows self-hosted runners reuse the warmed Cargo target baked into the runner image:
C:/actions-runner/_work/target, outside the checkout directory;windows-latest, Linux, and macOS behavior unchanged.The image-warming implementation remains in infra PR 1349 for now and is expected to move into a shared cross-platform Cargo command. This PR only consumes the resulting cache layout, so that implementation change will not require another workflow change.
Performance
Compared with the median of three successful
masterruns, the vm26 staging qualification run showed:sccache hit rates were only 0.23%–2.63%; the benefit comes primarily from avoiding compilation through the warmed Cargo target. Results are from one staging run versus three-run production medians, so smaller differences may be normal runner variance.
API and ABI breaking changes
None.
Rollback safety impact
n/a
Expected complexity level and risk
1 — low risk. CI configuration only; an image without the warm cache falls back to a cold but working build.
Testing
.github/workflows/ci.ymlparses successfullyspacetimedb-windows-runner