Skip to content

ci(macos): universal (Intel + Apple Silicon) build + arch assertion#3

Open
SashaMIT wants to merge 1 commit into
fix/macos-clt-before-clonefrom
ci/macos-universal-build
Open

ci(macos): universal (Intel + Apple Silicon) build + arch assertion#3
SashaMIT wants to merge 1 commit into
fix/macos-clt-before-clonefrom
ci/macos-universal-build

Conversation

@SashaMIT

Copy link
Copy Markdown
Contributor

Summary

  • The macOS CI build ran electron-builder --mac with no arch flag on the Apple-Silicon macos-latest runner, 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.
  • This switches the macOS target to a single universal binary (arch: universal for both dmg and zip), so one signed + notarized artifact runs on both Intel and Apple Silicon.
  • Adds a Verify macOS universal binary CI step that runs lipo -archs on ElastOS.app/Contents/MacOS/ElastOS and fails the build unless both x86_64 and arm64 are present — so an accidental single-arch build can never ship again.

Why this is low-risk

  • The launcher has no native arch-specific dependencies (electron-log, electron-store, qrcode are pure JS), so the universal merge has nothing to cross-compile.
  • Signing/notarization is unchanged (scripts/notarize.js still runs on the resulting dmg/zip).
  • Base branch is fix/macos-clt-before-clone (the commit v1.4.0 was cut from), so the diff is just these two files.

Test plan

  • Tag-triggered (or workflow_dispatch) CI run builds macOS green
  • Verify macOS universal binary step prints x86_64 arm64 and passes
  • Resulting DMG installs and launches on an Intel Mac and an Apple-Silicon Mac
  • Notarization (scripts/notarize.js) still reports Accepted + staples

Note (out of scope here)

main is 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 reconciling main separately so it reflects shipped code.

Made with Cursor

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]>
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