Skip to content

fix(ci): install Zig from Homebrew for manual macOS builds - #2300

Closed
cameronsjo wants to merge 1 commit into
herdrdev:masterfrom
cameronsjo:fix/manual-macos-zig
Closed

fix(ci): install Zig from Homebrew for manual macOS builds#2300
cameronsjo wants to merge 1 commit into
herdrdev:masterfrom
cameronsjo:fix/manual-macos-zig

Conversation

@cameronsjo

Copy link
Copy Markdown

Build artifacts (manual) currently fails both macOS jobs before it compiles
anything.

macos-latest now runs macOS 26, whose SDK is newer than the libSystem bundled
with the pinned Zig 0.15.2. Linking the vendored libghostty-vt build runner dies
with a wall of undefined libc symbols:

error: undefined symbol: _dispatch_semaphore_signal
  note: referenced by .zig-cache/o/.../build_zcu.o:_Build.Watch.FsEvents.eventCallback
error: undefined symbol: __availability_version_check
error: undefined symbol: _abort
...
thread 'main' panicked at build.rs:78:5:
zig build for vendored libghostty-vt failed: exit status: 2

release.yml already handles this. It gates mlugg/setup-zig behind
if: runner.os != 'macOS' and installs zig@0.15 from Homebrew instead
(Install patched Zig on macOS). The manual workflow never picked that up, so
it still calls setup-zig unconditionally.

This applies the same two steps to the manual workflow's macOS job: the Homebrew
download cache, then the brew install zig@0.15 that puts a Zig built against
the current SDK on PATH. The Linux and Windows jobs are untouched.

Verification

Both runs are on the same tree; the only difference is this patch.

Run Zig source aarch64 x86_64
before setup-zig 0.15.2 failed failed
after brew zig@0.15 passed passed

The resulting aarch64-apple-darwin binary runs on macOS 26 and reports the
expected version, so this is a build-host problem rather than anything wrong
with the vendored source.

Related: #285 covers the same SDK-versus-pinned-Zig mismatch for local macOS
builds. This only fixes CI.

macos-latest now runs macOS 26, whose SDK is newer than the libSystem
bundled with the pinned Zig 0.15.2. Linking the vendored libghostty-vt
build runner fails with a wall of undefined libc symbols (_abort,
_dispatch_semaphore_signal, __availability_version_check), so both macOS
jobs in the manual workflow fail before compiling anything.

release.yml already skips setup-zig on macOS and installs zig@0.15 from
Homebrew for this reason; the manual workflow never picked that up. This
applies the same two steps to its macOS job.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f65c743-8aa2-4fcf-9158-d11ae22767d7

📥 Commits

Reviewing files that changed from the base of the PR and between 1997b88 and 2737789.

📒 Files selected for processing (1)
  • .github/workflows/build-artifacts-manual.yml

📝 Walkthrough

Walkthrough

The macOS artifact workflow replaces mlugg/setup-zig with cached Homebrew installation of Zig 0.15. It adds the Zig binary directory to GITHUB_PATH and verifies the installed version.

Changes

macOS Zig installation

Layer / File(s) Summary
Cached Homebrew Zig setup
.github/workflows/build-artifacts-manual.yml
The workflow caches Homebrew downloads, installs Zig 0.15, adds its binary path to GITHUB_PATH, and prints the Zig version.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main CI change: installing Zig from Homebrew for manual macOS builds.
Description check ✅ Passed The description directly explains the macOS CI failure, the Homebrew Zig fix, and the verification results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@kangal-bot kangal-bot added the ai-review Trigger automated AI reviews for pull requests admitted by the PR gate label Aug 4, 2026
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown

Greptile Summary

This PR aligns the manual macOS artifact workflow with the existing release workflow to avoid incompatibility between the macOS 26 SDK and the standard Zig 0.15.2 distribution.

  • Replaces mlugg/setup-zig in the macOS job with Homebrew’s patched zig@0.15 formula.
  • Caches Homebrew downloads and adds the versioned Zig installation to subsequent steps’ PATH.
  • Leaves Linux and Windows artifact jobs unchanged.

Confidence Score: 5/5

The PR appears safe to merge because the manual macOS workflow now follows the repository’s established working Zig installation pattern.

The Homebrew formula satisfies the vendored library’s Zig version requirement, is added to the PATH consumed by the Rust build script, and the change remains isolated to macOS artifact jobs.

Important Files Changed

Filename Overview
.github/workflows/build-artifacts-manual.yml The macOS job now installs and exposes the patched Homebrew Zig formula using the same established sequence as the release workflow; no actionable defect was found.

Reviews (1): Last reviewed commit: "fix(ci): install Zig from Homebrew for m..." | Re-trigger Greptile

@ogulcancelik

ogulcancelik commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

we don't have any problem with ci so i don't understand what this pr tries to fix in the first place?

ah you mean the manual workflow. but why would you want to fix that i don't even use it anymore? please dont tell your agents to find issues on herdr that you can open pr for :/

@cameronsjo

cameronsjo commented Aug 4, 2026

Copy link
Copy Markdown
Author

You're right.

My agent took inspo from the wrong place and I blessed it. I didn't tell it to "find an issue", but I did experience the issue while doing local builds while building #2299.

You're right that this was the wrong implementation of it though, and it doesn't fix the root cause being local builds on macOS 26 can be a bit hairy to get working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Trigger automated AI reviews for pull requests admitted by the PR gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants