ci(macos): universal (Intel + Apple Silicon) build + arch assertion#3
Open
SashaMIT wants to merge 1 commit into
Open
ci(macos): universal (Intel + Apple Silicon) build + arch assertion#3SashaMIT wants to merge 1 commit into
SashaMIT wants to merge 1 commit into
Conversation
The macOS build ran electron-builder --mac with no arch flag on the Apple-Silicon GitHub runner, producing an arm64-only DMG that does not run on Intel Macs. Switch the mac target to a single universal binary so one signed+notarized artifact runs on both Intel and Apple Silicon, and add a CI step that fails the build unless `lipo -archs` shows both x86_64 and arm64. Co-authored-by: Cursor <[email protected]>
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.
Summary
electron-builder --macwith no arch flag on the Apple-Siliconmacos-latestrunner, so it produced an arm64-only DMG (ElastOS-1.4.0-arm64.dmg). That binary does not run on Intel Macs, and nothing in CI flagged it — CI signs/notarizes whatever arch it happens to build.arch: universalfor bothdmgandzip), so one signed + notarized artifact runs on both Intel and Apple Silicon.Verify macOS universal binaryCI step that runslipo -archsonElastOS.app/Contents/MacOS/ElastOSand fails the build unless bothx86_64andarm64are present — so an accidental single-arch build can never ship again.Why this is low-risk
electron-log,electron-store,qrcodeare pure JS), so the universal merge has nothing to cross-compile.scripts/notarize.jsstill runs on the resulting dmg/zip).fix/macos-clt-before-clone(the commitv1.4.0was cut from), so the diff is just these two files.Test plan
workflow_dispatch) CI run builds macOS greenVerify macOS universal binarystep printsx86_64 arm64and passesscripts/notarize.js) still reportsAccepted+ staplesNote (out of scope here)
mainis still at v1.2.7 — releases have been cut from feature branches (fix/macos-clt-before-clone= v1.4.0) and never merged back. Worth reconcilingmainseparately so it reflects shipped code.Made with Cursor