From e7e28db8a97315517fbb6d996acb412ef1a93394 Mon Sep 17 00:00:00 2001 From: Boppy OpenClaw <4099508+jdetter@users.noreply.github.com> Date: Wed, 16 Sep 2026 04:28:23 +0000 Subject: [PATCH 1/2] CI: give Windows a persistent Cargo target and enable sccache 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. --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e82ae6f4d5..5ceb8031437 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,8 +106,19 @@ jobs: name: Set Cargo target directory shell: bash run: | + # The self-hosted Windows runner root, matching $RunnerDir in + # clockworklabs/infra runner-manager.sh.j2 and the warmed layout + # created by warm-cache-windows.ps1. + windows_runner_work="C:/actions-runner/_work" if [[ "${RUNNER_OS}" == "Linux" ]]; then cargo_target_dir="${HOME}/actions-runner/_work/target" + elif [[ "${RUNNER_OS}" == "Windows" && -d "${windows_runner_work}" ]]; then + # Our Windows image ships a warmed target outside the workspace, + # because checkout wipes GITHUB_WORKSPACE on every run -- that one + # `else` branch was the entire reason Windows built cold. The + # directory only exists on the self-hosted image, so GitHub-hosted + # windows-latest (the update-flow job) still falls through below. + cargo_target_dir="${windows_runner_work}/target" else # Forward slashes keep the Windows path compatible with Cargo, # PowerShell, GitHub Actions, and Git Bash filesystem commands. @@ -117,15 +128,28 @@ jobs: - &configure-sccache name: Configure sccache - if: runner.os == 'Linux' + if: runner.os == 'Linux' || runner.os == 'Windows' shell: bash run: | + # `command -v` decides whether this runner was warmed at all, so an + # unwarmed image degrades to a cold-but-working build. It cannot + # supply RUSTC_WRAPPER on Windows though: it reports an MSYS path + # (/c/sccache/sccache.exe) that Cargo, a native Windows process, + # cannot execute. Hence the explicit per-OS paths below, which are + # written by the warm scripts in clockworklabs/infra. if command -v sccache >/dev/null 2>&1; then + if [[ "${RUNNER_OS}" == "Windows" ]]; then + sccache_bin="C:/sccache/sccache.exe" + sccache_dir="C:/actions-runner/_work/sccache" + else + sccache_bin="/usr/local/bin/sccache" + sccache_dir="${HOME}/.cache/sccache" + fi # sccache cannot cache incremental compilation artifacts, so # disable Cargo's incremental mode whenever the wrapper is active. echo "CARGO_INCREMENTAL=0" >>"${GITHUB_ENV}" - echo "RUSTC_WRAPPER=/usr/local/bin/sccache" >>"${GITHUB_ENV}" - echo "SCCACHE_DIR=${HOME}/.cache/sccache" >>"${GITHUB_ENV}" + echo "RUSTC_WRAPPER=${sccache_bin}" >>"${GITHUB_ENV}" + echo "SCCACHE_DIR=${sccache_dir}" >>"${GITHUB_ENV}" echo "SCCACHE_CACHE_SIZE=20G" >>"${GITHUB_ENV}" fi @@ -243,13 +267,13 @@ jobs: - &show-sccache-stats name: Show sccache statistics - if: always() && runner.os == 'Linux' + if: always() && (runner.os == 'Linux' || runner.os == 'Windows') shell: bash run: | if command -v sccache >/dev/null 2>&1; then sccache --show-stats else - echo "::notice::sccache is not installed on this Linux runner" + echo "::notice::sccache is not installed on this ${RUNNER_OS} runner" fi - name: Upload Cargo timing reports From 703a08cc1de95bdb5402dd41fb213beef7ff377c Mon Sep 17 00:00:00 2001 From: Boppy OpenClaw <4099508+jdetter@users.noreply.github.com> Date: Wed, 16 Sep 2026 17:29:07 +0000 Subject: [PATCH 2/2] TEMPORARY: run Windows jobs on the staging pool (DO NOT MERGE) 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 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ceb8031437..61aed7d832f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -299,7 +299,7 @@ jobs: needs: [merge_queue_noop, lints] if: ${{ needs.merge_queue_noop.outputs.skip != 'true' }} name: Upload build artifacts (Windows) - runs-on: spacetimedb-windows-runner + runs-on: spacetimedb-windows-runner-staging timeout-minutes: 15 env: RUST_BACKTRACE: full @@ -385,7 +385,7 @@ jobs: smoketest_build_windows: needs: [upload-build-artifacts-windows] name: Build smoketests (Windows) - runs-on: spacetimedb-windows-runner + runs-on: spacetimedb-windows-runner-staging timeout-minutes: 15 env: RUST_BACKTRACE: full @@ -561,7 +561,7 @@ jobs: fail-fast: false matrix: partition: [1, 2, 3, 4] - runs-on: spacetimedb-windows-runner + runs-on: spacetimedb-windows-runner-staging timeout-minutes: 30 env: RUST_BACKTRACE: full