ci: cross-compile aarch64-apple-darwin from Linux (drop macos-latest lane)#771
Conversation
…lane)
Replaces the `macos-latest` runner for the `aarch64-apple-darwin`
release lane with the existing `ubuntu-latest` runner already shared
by every other target. The Linux runner uses soldr +
cargo-zigbuild + soldr's managed Apple SDK to produce real Mach-O
arm64 binaries — closing the last cross-platform-runner dependency
in the release matrix.
## What landed
* `.github/workflows/release-auto.yml` — `aarch64-apple-darwin` lane
swaps `runner: macos-latest` for `runner: ubuntu-latest` plus the
new `mac_cross_linux: true` flag.
* `.github/workflows/template_native_build.yml` — adds the
`mac_cross_linux: true` boolean input + the matching build / PyO3 /
staging / strip branches. When set:
- `soldr prepare --target aarch64-apple-darwin` fetches the Apple
SDK ahead of cargo so the SDKROOT export is debuggable
independently
- `soldr cargo zigbuild --release --target aarch64-apple-darwin`
builds `fbuild-cli` + `fbuild-daemon`
- `PYO3_NO_PYTHON=1 soldr cargo zigbuild ...` builds the
`fbuild-python` PyO3 extension with the same target-dir layout
the macOS native lane produced (no rename needed in stage step)
- strip step is a no-op (Linux's binutils `strip` would silently
corrupt a Mach-O; the binaries ship unstripped at ~25 MB each)
* `ci/docker-mac-arm64-cross/` — a minimal `ubuntu:24.04`-based docker
image + `build.sh` that reproduces the GHA flow locally and asserts
via `file(1)` that all three output artifacts are
`Mach-O 64-bit ... arm64`. The "NO CHEATING" gate that locked the
workflow design.
## How it was validated
Local run inside the docker image, against the current tip of
FastLED/fbuild#main:
```
staging/fbuild: Mach-O 64-bit arm64 executable
staging/fbuild-daemon: Mach-O 64-bit arm64 executable
staging/_native.abi3.so: Mach-O 64-bit arm64 dynamically linked shared library
```
Sizes: 23 MB / 25 MB / 14 MB — comparable to the macOS-native lane.
## Known soft warnings (non-blocking)
* `rust-objcopy` fails to load `libLLVM.so` during the strip-debuginfo
post-link step on aarch64-apple-darwin — cargo's `profile.release.strip`
knob calls rust-objcopy which expects libLLVM next to the rustc binary.
Cargo treats this as a warning and the binaries are produced
correctly. soldr#934's `llvm-tools-preview` work covers this when
the catalogue ingest cycle wires it up.
* `soldr prepare` warns about a failed internal `rustup target add` —
cosmetic, the explicit `soldr rustup target add` in build.sh already
added the target. Tracked separately as a soldr bug.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe Changesaarch64-apple-darwin Linux Cross-Compile Lane
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Triggers the autonomous release workflow. First release that cross-compiles `aarch64-apple-darwin` from `ubuntu-latest` instead of running on a `macos-latest` runner (#771). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
setup-soldr@v0.9.62 defaults to soldr 0.7.51, which predates the \`soldr prepare\` builtin used by the new \`mac_cross_linux: true\` lane (landed in #771). The lane was failing with \`soldr: tool not found: prepare: not found on crates.io\` — soldr 0.7.51 treated \`prepare\` as a tool name and tried to fetch it from crates.io. Fix: * Bump action pin v0.9.62 → v0.9.63 (which defaults to 0.7.59) * Pin \`version: "0.7.59"\` explicitly so a future action default change doesn't silently shift build behavior. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Replaces the
macos-latestrunner for theaarch64-apple-darwinrelease lane with the existingubuntu-latestrunner already shared by every other target. Uses soldr + cargo-zigbuild + soldr's managed Apple SDK to produce real Mach-O arm64 binaries from Linux x86_64. Removes the last cross-platform-runner dependency from the release matrix.What landed
.github/workflows/release-auto.yml— aarch64-apple-darwin lane swaps toubuntu-latest+ newmac_cross_linux: trueflag.github/workflows/template_native_build.yml— adds themac_cross_linuxboolean + matching build / PyO3 / staging / strip branchesci/docker-mac-arm64-cross/— minimalubuntu:24.04-based docker image +build.shthat reproduces the GHA flow locally and asserts viafile(1)that all three artifacts are valid Mach-O arm64. The "NO CHEATING" local-validation gate.How it was validated
Local docker run against current main:
Sizes: 23 MB / 25 MB / 14 MB — comparable to the macOS-native lane.
Test plan
file(1)aarch64-apple-darwinmatrix entry succeeds onubuntu-latest_native.abi3.solayout)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation