ci(electron-desktop): build mac x64 alongside arm64#79
Open
leonardo-oliveir-a wants to merge 1 commit intoAtomicBot-ai:mainfrom
Open
ci(electron-desktop): build mac x64 alongside arm64#79leonardo-oliveir-a wants to merge 1 commit intoAtomicBot-ai:mainfrom
leonardo-oliveir-a wants to merge 1 commit intoAtomicBot-ai:mainfrom
Conversation
- Add x64 to mac.target archs in electron-builder config - Run prepare:* runtimes twice in CI (arm64 + x64) so vendor binaries exist for both architectures - Pass --mac --arm64 --x64 to electron-builder - Emit latest-mac.yml listing both zips so electron-updater serves the right binary to Apple Silicon and Intel Macs
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
Make the Electron desktop release publish an Intel (x64) Mac build in addition to the existing Apple Silicon (arm64) build, so users on Intel Macs (e.g. 2018/2019 models still on supported macOS) can install and auto-update Atomic Bot.
The runtime code is already arch-agnostic — every
prepare-*-runtime.mjsscript branches onTARGET_ARCH, andsrc/main/llamacpp/backend-download.tsalready mapsx64→llama-turboquant-macos-x64.zip. The only thing missing was a CI build that exercises the x64 path.Changes
apps/electron-desktop/package.json— declare both archs inmac.target:.github/workflows/electron-desktop.yml(mac job, still onmacos-14):prepare:*runtime steps twice — once withTARGET_PLATFORM=darwin TARGET_ARCH=arm64, once withTARGET_ARCH=x64. The prepare scripts already key their output by${platform}-${arch}, sovendor/<tool>/darwin-arm64/andvendor/<tool>/darwin-x64/coexist and electron-builder picks the right one per arch at pack time.--mac --arm64 --x64toelectron-builder.latest-mac.ymlgeneration to list both zips in thefiles:array soelectron-updaterserves the correct binary to Apple Silicon vs Intel clients. The top-levelpath/sha512keep pointing at arm64 for backwards compatibility with older updater clients.The existing
gh release uploadloop already globs*.zip *.dmg *.blockmap, so it picks up both new artifacts with no change.Test plan
workflow_dispatch(publish=false) and confirm the artifact contains bothAtomic-Bot-<version>-arm64-mac.zipandAtomic-Bot-<version>-x64-mac.zip, plus alatest-mac.ymllisting both files.Bad CPU type in executable).electron-updateron an Intel client picks up the x64 entry fromlatest-mac.yml.Notes
macos-14(arm64) runner — electron-builder cross-builds the x64 zip from there, no matrix or extra runner needed. Expect roughly +50% wall-clock on the prepare/pack steps.