Skip to content

ci: add x86_64-apple-darwin lane (Linux cross via mac_cross_linux)#775

Merged
zackees merged 1 commit into
mainfrom
feat/linux-cross-mac-x86
Jun 28, 2026
Merged

ci: add x86_64-apple-darwin lane (Linux cross via mac_cross_linux)#775
zackees merged 1 commit into
mainfrom
feat/linux-cross-mac-x86

Conversation

@zackees

@zackees zackees commented Jun 28, 2026

Copy link
Copy Markdown
Member

soldr#1006 Lane 3. Closes the easiest remaining gap — x86_64-apple-darwin built from ubuntu-latest via the existing mac_cross_linux: true template branch. Renames ci/docker-mac-arm64-crossci/docker-mac-cross since the same image now validates both Apple targets.

Local docker validation in progress in parallel; verifies 3 Mach-O x86_64 artifacts under staging/.

Summary by CodeRabbit

  • New Features

    • Added support for building release binaries for both Apple Silicon and Intel macOS targets.
    • Expanded release automation to cover the x86_64-apple-darwin cross-build path.
  • Bug Fixes

    • Improved binary validation so packaged macOS artifacts are checked against the expected architecture before release.
    • Updated build instructions and verification steps to match the broader macOS cross-build flow.

soldr#1006 Lane 3. Closes the easiest remaining gap from the meta:
\`x86_64-apple-darwin\` is now built from \`ubuntu-latest\` via the same
\`mac_cross_linux: true\` template branch the arm64 lane already uses
(landed in #771). Soldr's apple_sdk fetcher auto-picks the
\`darwin-x86_64\` thin shape when the target triple matches, and
\`cargo zigbuild --target x86_64-apple-darwin\` resolves SDKROOT +
frameworks identically.

Net effect:
- fbuild's release matrix gains a 5th target (mac Intel) for the same
  per-release runner cost (just adds another ubuntu-latest job).
- Zero \`macos-latest\` runners left in the matrix — both Apple
  targets cross-compile from Linux.

## Docker harness changes

* Renamed \`ci/docker-mac-arm64-cross/\` → \`ci/docker-mac-cross/\` since
  the same image now validates both Apple targets.
* \`build.sh\` takes a target as positional arg or \`TARGET=\` env var
  (default: aarch64-apple-darwin); per-target arch verification —
  \`arm64|aarch64\` for arm64 lane, \`x86_64\` for Intel lane.
* Image tag bumped from \`fbuild-mac-arm64-cross\` →
  \`fbuild-mac-cross\` to match.

## Test plan
- [x] Build docker image
- [ ] Run \`bash ci/docker-mac-cross/build.sh x86_64-apple-darwin\`,
      verify 3 Mach-O x86_64 artifacts under staging/
- [ ] Trigger a release via version bump; verify new matrix entry
      ships \`fbuild-v<ver>-x86_64-apple-darwin.tar.gz\`

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 865e2996-8846-4490-84e1-b1e50202db8f

📥 Commits

Reviewing files that changed from the base of the PR and between af788a6 and 4383991.

📒 Files selected for processing (5)
  • .github/workflows/release-auto.yml
  • .github/workflows/template_native_build.yml
  • ci/docker-mac-cross/Dockerfile
  • ci/docker-mac-cross/README.md
  • ci/docker-mac-cross/build.sh

📝 Walkthrough

Walkthrough

The PR extends the macOS cross-compilation infrastructure to support x86_64-apple-darwin in addition to aarch64-apple-darwin. ci/docker-mac-cross/build.sh gains configurable TARGET selection and per-target Mach-O verification. The release workflow matrix gains an x86_64-apple-darwin entry, and Dockerfile/README docs are updated to cover both targets.

Changes

x86_64-apple-darwin cross-compilation support

Layer / File(s) Summary
Configurable TARGET in build.sh
ci/docker-mac-cross/build.sh
TARGET is now read from a positional arg or env var (defaulting to aarch64-apple-darwin), validated via case, and used to set MACHO_ARCH_PATTERN. The verification loop checks all three staged artifacts (fbuild, fbuild-daemon, _native.abi3.so) against the dynamic pattern.
CI matrix entry and workflow comment
.github/workflows/release-auto.yml, .github/workflows/template_native_build.yml
Adds x86_64-apple-darwin as a new build matrix include using the mac_cross_linux lane. Updates inline comment to reference ci/docker-mac-cross/build.sh.
Dockerfile and README docs
ci/docker-mac-cross/Dockerfile, ci/docker-mac-cross/README.md
Header comments, example docker build/docker run commands, and verification descriptions updated to cover both Apple targets and show the x86_64-apple-darwin argument.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • FastLED/fbuild#16: Directly intersects — cross-builds and stages the same _native.abi3.so for x86_64-apple-darwin.
  • FastLED/fbuild#771: Introduced the mac_cross_linux path in template_native_build.yml that this PR extends to support x86_64.

Poem

🐇 Hop hop, two targets now!
ARM and Intel, both get the Mach-O vow.
No cheating with ELF, the file command sees,
Cross-compiled binaries dancing with ease.
One script to rule them both — what a feat! 🍎

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/linux-cross-mac-x86

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@zackees zackees merged commit 5208664 into main Jun 28, 2026
86 of 91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant