Skip to content

ci(binaries): cross-build the Intel Mac from Apple silicon - #64

Merged
vyncint merged 1 commit into
mainfrom
intel-mac-on-arm
Aug 23, 2026
Merged

ci(binaries): cross-build the Intel Mac from Apple silicon#64
vyncint merged 1 commit into
mainfrom
intel-mac-on-arm

Conversation

@vyncint

@vyncint vyncint commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Short answer to "should we cancel the Intel Mac build": no — but it should stop needing an Intel runner.

The problem is scheduling, not the target

On the v0.6.2 release the x86_64-apple-darwin leg sat queued for 45 minutes while every other target finished inside ninety seconds:

success  x86_64-unknown-linux-musl     (50s)
success  aarch64-apple-darwin          (43s)
success  aarch64-unknown-linux-musl    (42s)
success  x86_64-pc-windows-msvc        (1m31s)
queued   x86_64-apple-darwin           ← 45+ min, never started

GitHub is winding the Intel runners down. A target nobody can schedule is a target that silently stops shipping — which is worse than one that is cross-built, and much worse than one you decided to drop on purpose.

It does not need an Intel runner

Xcode's toolchain and SDK are universal. An arm64 Mac produces an x86-64 binary with nothing but rustup target add x86_64-apple-darwin — no sysroot to fetch, no linker to configure, no cross. Both macOS targets now build on macos-latest.

The failure this introduces, and the check for it

Cross-building has exactly one new way to go wrong: producing the host's architecture while claiming the target's. That would pass the build, pass packaging, pass the checksum, upload cleanly — and fail on the first Intel Mac that downloaded it.

So the job now asks file what it actually built:

architecture check: x86_64 — Mach-O 64-bit executable x86_64

and fails loudly otherwise. Verified the matcher discriminates in both directions before committing it:

target file says result
x86_64-apple-darwin … x86_64 PASS
aarch64-apple-darwin … arm64 PASS
x86_64-apple-darwin … arm64 FAIL
aarch64-apple-darwin … x86_64 FAIL

Non-macOS targets skip it — Linux and Windows are built natively and have nothing to confuse.

If you would rather drop it

Dropping x86_64-apple-darwin is defensible: Apple stopped selling Intel Macs in 2023 and the population shrinks monthly. But that should be a decision, not an accident of runner availability — and while it costs one cross-compile on a runner we are already paying for, keeping it seems the easier call.

Once merged I will re-dispatch for v0.6.2 and confirm the uploaded archive really is Intel.

On the v0.6.2 release the x86_64-apple-darwin leg sat queued for
forty-five minutes while every other target finished inside ninety
seconds. GitHub is winding the Intel runners down, and a target nobody
can schedule is a target that silently stops shipping.

It does not need one. Xcode's toolchain and SDK are universal, so an
arm64 runner produces an x86-64 binary with nothing but rustup target
add -- no sysroot to fetch, no linker to configure.

The job now asks file what it actually built and fails if the answer is
not the architecture the target names. A cross-build that quietly
produced the host's architecture would pass every other check here and
fail on the first machine that downloaded it, which is the one failure
mode this change introduces and therefore the one worth checking.

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint
vyncint merged commit 265cc0d into main Aug 23, 2026
11 checks passed
@vyncint
vyncint deleted the intel-mac-on-arm branch August 23, 2026 07:33
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