CI: build the macOS app as a universal binary (x86_64 + arm64) (#51)#58
Merged
Conversation
The shipped macOS app was arm64-only and wouldn't launch on Intel Macs. The build used `-destination 'platform=macOS'`, which on the Apple-Silicon runners resolves to the host arch and thins the binary — project.yml's `ONLY_ACTIVE_ARCH: NO` only applies under `configs.Release`, so the Debug build inherited the default YES. Confirmed against the shipped v8.3.4 zip: `lipo`/`file` report arm64 only, no x86_64 slice. Force a true universal build in all three workflows (release, testing, CI verify) with the generic destination plus explicit `ARCHS="x86_64 arm64" ONLY_ACTIVE_ARCH=NO`. These are command-line build settings that override the config, so the configuration stays Debug and nothing else about the shipping build changes. Added a `lipo -archs` guard to the release + testing jobs that fails the build if the binary isn't universal, so this can't silently regress again. Fixes #51.
…ts read) The verify step used `defaults read $APP/Contents/Info CFBundleExecutable` to locate the binary, which failed on the runner. Find the Mach-O executable directly under Contents/MacOS instead (skipping dylibs) — no plist parsing, space-safe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The shipped macOS app is arm64-only and won't launch on Intel Macs. Confirmed against the released v8.3.4 zip:
No x86_64 slice anywhere in the bundle. (Reported in #51.)
Root cause
The macOS build used
-destination 'platform=macOS', which on the Apple-Silicon runners resolves to the host arch and thins the binary.project.yml'sONLY_ACTIVE_ARCH: NOis set only underconfigs.Release, so the-configuration Debugbuild inherited the defaultYES→ arm64-only.Fix
Force a true universal build in all three macOS workflows (
fork-release,fork-testing-build,app-build) with the generic destination + explicit archs:These are command-line build settings that override the project config, so the configuration stays Debug and nothing else about the shipping build changes (same signing flags, same output path, same package step). Also added a
lipo -archsguard to the release + testing jobs that fails the build if the binary isn't universal, so this can't silently regress again.Verification
Dispatched a testing build off this branch; the new "Verify universal binary" step confirms
x86_64 + arm64(see run). The minimal-scope approach was chosen deliberately over a broader refactor — this is only the arch flags, no config/signing/bundle-name changes.Fixes #51.