Skip to content

ci(gpui): cross-compile the macOS x86_64 release on Apple Silicon - #125

Draft
tee8z wants to merge 1 commit into
mainfrom
ci/gpui-macos-x86-cross
Draft

tee8z wants to merge 1 commit into
mainfrom
ci/gpui-macos-x86-cross

Conversation

@tee8z

@tee8z tee8z commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Why

The macOS x86_64 package is the long pole of every GPUI release: about 61 minutes on macos-15-intel, 51 of them in the compile step. The identical build takes 17 minutes on macos-14 (Apple Silicon). Timings are from release run 41893713064, v0.2.0+voltage.1.

What

Build the x86_64 .dmg on macos-14 with --target x86_64-apple-darwin:

  • package-macos.sh takes BUZZ_GPUI_MACOS_ARCH. When it differs from the machine's arch, the script:

    • sets CARGO_BUILD_TARGET and PKG_CONFIG_ALLOW_CROSS
    • reads the binaries from target/<triple>/release

    The GStreamer framework the job installs is the universal .pkg, so it carries x86_64, and bundle-macos-gstreamer.py already thins to the requested arch. Node is already chosen per arch. Native builds are unchanged.

  • build-package.sh stages the relay provider in the same target/<triple>/release.

  • Workflow, for the x86_64 job:

    • runs on macos-14 with the x86_64-apple-darwin target
    • installs Rosetta, because check-macos-dmg.sh runs the bundled x86_64 Node and provider
    • gets its own Rust cache key, since both arches now share a runner image

Validation

  • scripts/test-package-build.py: new case for a cross build staging the provider beside the cross-built app. It fails against the old build-package.sh; all 4 cases pass with the change.
  • actionlint is clean; bash -n passes on both scripts.
  • This PR's CI is the real test. Editing this workflow runs the full release build matrix without publishing, so the x86_64 job's time and its check-macos-dmg.sh result show whether the cross build is correct. Expect the x86_64 job near the arm64 one's ~20 minutes. The first run of each cache key starts cold.

Not yet verified: the x86_64 .dmg launching on a real Intel Mac. That needs a human with one before this leaves draft.

package-macos.sh and build-package.sh also exist in benthecarman/buzz-gpui. The change is generic, so it can be offered upstream with scripts/upstream-buzz-gpui.sh.

🤖 Generated with Claude Code

The macOS x86_64 package took about 61 minutes on macos-15-intel, 51 of
them compiling, against 17 for the same build on macos-14. Build it on
macos-14 with --target x86_64-apple-darwin instead.

package-macos.sh takes BUZZ_GPUI_MACOS_ARCH. When it differs from the
machine, it sets CARGO_BUILD_TARGET and PKG_CONFIG_ALLOW_CROSS (the
universal GStreamer framework carries x86_64), and reads the binaries from
target/<triple>/release. build-package.sh stages the relay provider in that
same directory. Native builds are unchanged.

The x86_64 job installs Rosetta, which its checks need to run the bundled
x86_64 Node and provider, and the two architectures get separate Rust
caches now that they share a runner image.

Signed-off-by: Tee8z <tee8z@protonmail.com>
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@tee8z tee8z self-assigned this Nov 4, 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