Skip to content

ci(release): bound macOS build steps with timeouts#324

Merged
forketyfork merged 2 commits into
mainfrom
ci/release-build-timeouts
May 29, 2026
Merged

ci(release): bound macOS build steps with timeouts#324
forketyfork merged 2 commits into
mainfrom
ci/release-build-timeouts

Conversation

@forketyfork
Copy link
Copy Markdown
Owner

Solution

The v0.65.5 release run stalled: the x86_64 build on the macos-15-intel runner hung partway through zig build, and because nothing capped its runtime it would have stayed there until the 6-hour Actions limit. That blocks the release and the downstream update-formula job, which needs both matrix legs to finish. The arm64 leg, by contrast, completed in under 5 minutes, and every recent release has finished in 7–10 minutes total.

This adds GitHub Actions timeouts so a hang fails fast instead of sitting for hours:

  • Job-level timeout-minutes: 30 on build-macos as a hard backstop.
  • Step-level timeout-minutes: 20 on Build release — the step that actually hung.
  • Step-level timeout-minutes: 10 on Prefetch Zig dependencies — the other network-bound step.

Normal jobs finish well under 10 minutes, so these limits leave 2–3× headroom and won't trip on a genuinely slow-but-healthy run. The existing for i in 1 2 3 retry loop is untouched and still covers transient non-zero failures.

I considered wrapping each build attempt in a timeout command so a hang would feed back into the retry loop, but the dev shell doesn't include coreutils and macOS runners don't ship timeout natively, so that would mean a new dependency. The built-in timeout-minutes reaches the same outcome without one.

Test plan

  • Confirm the next tagged release (or a workflow_dispatch run) completes both matrix legs within the new limits.
  • If feasible, sanity-check that a deliberately hung step is killed at its timeout-minutes boundary rather than running indefinitely.

Issue: the v0.65.5 release stalled because the x86_64 build on the Intel
runner hung mid-compile and, with no timeout configured, would have sat
there until the 6-hour Actions limit, blocking the release and the
Homebrew formula update.

Solution: add a 30-minute job-level timeout as a backstop, plus tighter
per-step timeouts on the two steps that can stall (20m for the build,
10m for the dependency prefetch). A normal job finishes in under 10
minutes, so these leave comfortable headroom while turning a multi-hour
hang into a fast failure that frees the runner. The existing retry loop
still covers transient non-zero failures.
@forketyfork forketyfork marked this pull request as ready for review May 29, 2026 12:10
@forketyfork forketyfork merged commit ed7e595 into main May 29, 2026
4 checks passed
@forketyfork forketyfork deleted the ci/release-build-timeouts branch May 29, 2026 12:22
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