Skip to content

ci(electron-desktop): build mac x64 alongside arm64#79

Open
leonardo-oliveir-a wants to merge 1 commit intoAtomicBot-ai:mainfrom
leonardo-oliveir-a:mac-intel-x64-build
Open

ci(electron-desktop): build mac x64 alongside arm64#79
leonardo-oliveir-a wants to merge 1 commit intoAtomicBot-ai:mainfrom
leonardo-oliveir-a:mac-intel-x64-build

Conversation

@leonardo-oliveir-a
Copy link
Copy Markdown

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.mjs script branches on TARGET_ARCH, and src/main/llamacpp/backend-download.ts already maps x64llama-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 in mac.target:
    "target": [{ "target": "zip", "arch": ["arm64", "x64"] }]
  • .github/workflows/electron-desktop.yml (mac job, still on macos-14):
    • Run all prepare:* runtime steps twice — once with TARGET_PLATFORM=darwin TARGET_ARCH=arm64, once with TARGET_ARCH=x64. The prepare scripts already key their output by ${platform}-${arch}, so vendor/<tool>/darwin-arm64/ and vendor/<tool>/darwin-x64/ coexist and electron-builder picks the right one per arch at pack time.
    • Pass --mac --arm64 --x64 to electron-builder.
    • Update the manual latest-mac.yml generation to list both zips in the files: array so electron-updater serves the correct binary to Apple Silicon vs Intel clients. The top-level path/sha512 keep pointing at arm64 for backwards compatibility with older updater clients.

The existing gh release upload loop already globs *.zip *.dmg *.blockmap, so it picks up both new artifacts with no change.

Test plan

  • Run the workflow via workflow_dispatch (publish=false) and confirm the artifact contains both Atomic-Bot-<version>-arm64-mac.zip and Atomic-Bot-<version>-x64-mac.zip, plus a latest-mac.yml listing both files.
  • Download the x64 zip on an Intel Mac, launch Atomic Bot, verify it starts and the bundled vendor binaries (node, jq, gh, gog, memo, remindctl, obsidian-cli, whisper-cli) execute (no Bad CPU type in executable).
  • Verify electron-updater on an Intel client picks up the x64 entry from latest-mac.yml.

Notes

  • Build still runs on a single 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.
  • Code signing/notarization paths are unchanged; both archs are signed with the same identity.

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

2 participants