Repository navigation
ci(process-daemon): pin MSVC 14.51 and cache/prefetch Ghostty dependencies - #64285
Conversation
There was a problem hiding this comment.
I found no problems that should block this change. I couldn't run the workflows here, so I tested the fetch-and-cache part locally. With Zig 0.16.0 and the pinned Ghostty revision, zig build --fetch=all wrote only portable tarballs to .zig-cache/p (about 120 MB), so a shared cross-OS key is safe. After I deleted the fetched packages from the checkout, a second fetch with the network disabled rebuilt everything from that directory in under a second. On a cache hit, jobs no longer contact deps.files.ghostty.org. Step order in both workflows looks right: prefetch runs after the x64 Zig install and alignment patch on Windows ARM64, and before the release-bin wrapper in the Unix release jobs. build.rs already supports GHOSTTY_SOURCE_DIR and still checks the pinned revision and headers.
Public API is unchanged; this is CI only.
659fb11 to
3dd5acd
Compare
User decisions: - Cache Zig dependencies on every platform in both daemon workflows - Fetch dependencies in a separate step before building - Ship it as its own PR - Also ship the MSVC pin in this build PR, separate from the daemon fix
User decisions: - Pin the older MSVC toolset rather than suppressing the compiler version check
There was a problem hiding this comment.
I found nothing in the new commit that should block a merge. The MSVC step needs Windows runners and Visual Studio, so I couldn't run it; this is a review of the code only. It installs 14.51 only when the libraries for the job's architecture are missing, then writes Microsoft.VCToolsVersion.default.txt so the runner uses 14.51 by default. Zig reads that file for its headers and Rust's MSVC detection reads it for linking, so the Ghostty library is built and linked against the same toolset. The zig libc check stops the job early if Zig picks other headers. On arm64 the step runs after the x64 Zig is added to PATH and patched. One small risk: when 14.51 has to be installed, the Visual Studio installer downloads from the network and adds time inside the 30-minute check timeout.
Public API is unchanged; this is CI only.
User decisions: - Keep setup-zig's cache off - Raise Windows timeouts and check both x64 and arm64 MSVC libraries
There was a problem hiding this comment.
I found nothing in the new commit that should block a merge. It only runs on Windows runners, so I reviewed the code without running it. The pin step now requires both the x64 and the target-architecture MSVC 14.51 runtime libraries before it installs or selects a toolset. That matters on arm64, where the build uses the x64 Zig. The same check decides both whether to install and which toolset to pick, so the two can't disagree. The step's own 20-minute limit and the Windows check job's timeout going from 30 to 45 minutes address my earlier note that the installer could push the job past its old 30-minute timeout.
Public API is unchanged; this is CI only.
Issue for this PR
In the last 28 failed daemon runs, downloads from deps.files.ghostty.org failed in 14 Windows arm64 jobs, 2 Windows x64 jobs and 1 Linux musl job (0 macOS). Separately, the November 12 windows-11-arm image selects MSVC 14.52, whose STL headers require Clang 22. Zig 0.16 bundles Clang 21 (STL1000 log).
Type of change
What does this PR do?
Both Windows matrices install MSVC 14.51 if needed, select it as the runner's default, and verify the include directory reported by
zig libcbefore prefetch and build. The STL compiler compatibility check stays enabled.Every job that builds Ghostty checks out the pinned source and runs
zig build --fetch=allbefore Cargo, with up to four attempts (5s, 10s, 20s backoff). Cargo uses the same checkout viaGHOSTTY_SOURCE_DIR. The Miri harnesses are standalone Rust workspaces.Both workflows cache the source tarballs (
.zig-cache/p) on job success under the same cross-OS key, derived from the installed Zig version andghostty-revision. A successful check on the default branch (dev) seeds the cache for release tags. A change to either pin gets a new key. CI-only; no feature flag.User decision: Also ship the MSVC pin in this build PR, separate from the daemon fix.
How did you verify your code works?
Ran actionlint on the workflows. Tested the retry by disconnecting the first fetch, then restored a fresh checkout from the tarballs with the network disabled. Built and ran Clippy on Linux in a network-isolated namespace. Both daemon workflows run on this PR.
Screenshots / recordings
N/A
Checklist