Uh oh!
There was an error while loading. Please reload this page.
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 |
Uh oh!
There was an error while loading. Please reload this page.
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>
) 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>
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