feat(macos): add Intel (x86_64) build with separate DMG#8
Draft
jguice wants to merge 3 commits into
Draft
Conversation
Pyke ort 2.0.0-rc.12 doesn't ship prebuilt ONNX Runtime binaries for x86_64-apple-darwin (their prebuilts cover arm64-darwin, linux, and windows only). To produce an Intel utter binary, we build ONNX Runtime v1.24.2 from source on a native Intel runner (macos-14-large), then point ort-sys at it via ORT_LIB_PATH so the multi-file static link path takes over. The pin matches what pyke validates against in their custom-static-link.yml. Silicon path is bit-for-bit unchanged: same macos-14 runner, same prebuilt-onnxruntime download, same DMG. The new Intel job runs in parallel and produces a separate utter-VERSION-macos-x86_64.dmg. The release job's existing dist/utter-*-macos-*.dmg glob picks up both. The from-source ONNX Runtime build is the slow step (~30 min cold). Cached by ONNXRUNTIME_VERSION so it only re-runs when we bump the pin. --skip_tests trims ~30% off the cold build time since we only need the .a libs for static linking, not the test executables. Validated end-to-end on a local Intel Mac: built, signed, launched, permissions granted, model downloaded, PTT transcription works. The CI cross-runner equivalence is on macos-14-large (slow but native — see actions/runner-images#12545). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e095df9 to
9b871fa
Compare
Adds two workflows that build and publish a per-branch GitHub Pre-Release on every PR push, replacing the prior prerelease in place so the Releases page never accumulates more than one prerelease per branch. prerelease.yml: - Triggers on PR opened/synchronize/reopened + workflow_dispatch (so branches without a PR can still get a manual build). - Concurrency group keyed on branch with cancel-in-progress, so burst pushes only build the latest commit. - Computes a semver-compliant prerelease version of the form <cargo-version>-<sanitized-branch>.<short-sha>, e.g. 0.3.0-feat-macos-universal-binary.abc1234. Branch name is lowercased and non-[a-z0-9.-] chars collapsed to dashes. - Builds the same matrix as release.yml: Linux amd64+arm64 (.deb/.rpm/.tar.gz), macOS arm64 DMG, macOS x86_64 DMG (with the from-source ONNX Runtime cache shared with release.yml's cache key). - Publishes via softprops/action-gh-release with prerelease: true and make_latest: false, so it doesn't appear as "Latest" on the Releases page or in the /releases/latest API endpoint (which install-release.sh follows — Linux users won't accidentally pull a prerelease). - Deletes the existing prerelease + tag (if any) before publishing the new one. Tag is constant per branch (prerelease-<sanitized-branch>), version inside the filename changes per build. prerelease-cleanup.yml: - On PR closed (merged or not), deletes the per-branch prerelease + tag. Same sanitization logic as prerelease.yml (must stay in lockstep). Fork PRs from external contributors will fail at the codesign step because GitHub doesn't expose secrets to fork PRs — by design. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
macos-14-large is a Team/Enterprise-only larger runner — jobs targeting it on a Pro account fail instantly with no runner assignment. Switch both the release and prerelease workflows to macos-15-intel, which is a standard 4-core Intel runner: free + unlimited on public repos, no plan or billing setup needed. The *-intel suffix denotes a standard Intel runner; the *-large suffix denotes a 12-core larger runner. Easy to confuse — the runner-images README lists both labels in the same row even though they're billed differently. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
macos-intel-buildjob that producesutter-VERSION-macos-x86_64.dmgfor Intel Macs.macos-14runner, same prebuilt ONNX Runtime download, same arm64 DMG. The new job runs in parallel and the release glob (dist/utter-*-macos-*.dmg) already picks up both.### macOS (Intel)section after Apple Silicon; existing silicon section + heading + anchor untouched.Why this shape (vs. universal binary, vs. load-dynamic)
Pyke
ort 2.0.0-rc.12doesn't ship prebuilt ONNX Runtime forx86_64-apple-darwin. We considered:ortload-dynamic+ bundled universal2 dylib — symmetric across arches but inflates the silicon DMG from ~9.5 MB to ~70-80 MB.How it works
macos-intel-buildjob runs onmacos-14-large(native Intel).microsoft/onnxruntimeatv1.24.2(matches whatpykeio/ort'scustom-static-link.ymlvalidates against), runs theirbuild.shwith--skip_teststo trim ~30% off cold-build time. Output is the multi-file static.aset ort-sys'sstatic_link/mod.rsknows how to consume.ONNXRUNTIME_VERSION— heavy build only re-runs when we bump the pin.cargo build --release --target x86_64-apple-darwinwithORT_LIB_PATHpointing at the build dir → ort-sys static-links the local libs instead of trying (and failing) to download a prebuilt.-macos-x86_64.dmgname.Local validation
End-to-end on an Intel Mac:
cargo buildproduces a 21 MB x86_64 Mach-Omake-bundle.sh+ Apple Development cert → stable-signed.appCaveats / known unknowns
macos-14-largewhich is also native Intel but reportedly slow. First CI release run is the real test.--skip_testsmitigates.macos-14-largewill sunset alongsidemacos-14per actions/runner-images#13518. Both macOS jobs will need to migrate tomacos-15-intel/macos-15together — kept aligned here intentionally.Test plan
gh workflow run release.yml -f tag=v0.3.0 --ref feat/macos-universal-binaryand confirm:macos-build) succeeds with no behavior changemacos-intel-build) succeeds: ONNX Runtime build → cargo build → bundle → notarize → DMG → notarize DMGdist/contains bothutter-0.3.0-macos-arm64.dmgandutter-0.3.0-macos-x86_64.dmg🤖 Generated with Claude Code