Skip to content

ci: build Windows without sccache when its cache backend refuses it, instead of failing every rustc call - #1167

Merged
DrunkOnJava merged 3 commits into
mainfrom
ci/sccache-fallback
Oct 30, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
ci/sccache-fallback

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

A false red on #1152: build + real files / windows-latest / stable failed in 53 s (run 41112975909, job 124259839850) before compiling anything. sccache's server would not start, because GitHub's Actions cache answered ServerBusy: Egress is over the account limit, and with RUSTC_WRAPPER=sccache the first rustc -vV through the wrapper exited 2 (log lines 416-418).

The Windows step now starts the sccache server itself (kept up for the job with SCCACHE_IDLE_TIMEOUT=0) and sets RUSTC_WRAPPER only if it starts. Otherwise it writes a warning and the job builds with plain rustc: slower, same result. SCCACHE_IGNORE_SERVER_IO_ERROR=1 makes a later I/O error with a running server compile locally instead of failing.

Changes

  • .github/workflows/ci.yml: the "Use sccache (Windows)" step, with a comment saying why.

Testing

  • actionlint: no new finding against main's file (the shellcheck note on the redirects is fixed by grouping them); every workflow loads with yaml.safe_load.
  • This PR's Windows jobs exercise the path where the server starts (sccache in use as before). The fallback path runs only when the cache backend refuses sccache, which cannot be forced from a pull request; its branch is a warning plus not setting the wrapper.

Audit-honesty checklist

  • No user-visible change; no changelog fragment
  • No emojis, no private paths or personal addresses in committed files

Related issues

Seen on #1152.

@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Self-review: one step. sccache --start-server goes through the same server startup that failed in job 124259839850, so it exits non-zero in that case and the wrapper is never set. SCCACHE_IDLE_TIMEOUT=0 is exported before the server starts, so it applies to that server. With the wrapper unset the job matches a Linux or macOS job (no sccache). CI passed gates this on its own Windows jobs, which use the start path. Armed.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 19:23
@DrunkOnJava
DrunkOnJava merged commit 6eca8e0 into main Oct 30, 2026
29 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/sccache-fallback branch October 30, 2026 20:00
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant