Build universal (arm64 + x86_64) release binaries - #10
Open
bryankaufman wants to merge 1 commit into
Open
Conversation
…ase binaries The 0.4.0 release binaries were arm64-only and failed with "bad CPU type in executable" on Intel Macs. The Swift source is architecture-agnostic, so the fix is purely in packaging: build universal binaries for release. build-release.sh builds each product with `swift build --arch arm64 --arch x86_64 -c release` and packages them as <product>-<version>.tar.gz (binary at archive root) — matching the existing release asset layout. Also documents the release process in the README. Fixes alldritt#9
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.
What & why
The
0.4.0release binaries are arm64-only and fail on Intel Macs withbad CPU type in executable(see #9). The Swift source is architecture-agnostic — the gap is only in how the release binary is packaged.This PR adds
Scripts/build-release.sh, which builds universal binaries so a single release runs on both Apple Silicon and Intel:and packages each as
<product>-<version>.tar.gzwith the binary at the archive root — matching the existing release asset layout (bin.install "<product>"in the Homebrew formula keeps working unchanged).Usage
Defaults
VERSIONfromgit describe(stripping anyaelint-/vprefix) and writes tarballs torelease/.Verified
Tested on an Intel Mac (Xeon W-2191B):
swift build -c release --arch arm64 --arch x86_64producesx86_64 arm64binaries for bothaequeryandaelint.aelint --version→0.4.0,aequery --version→0.3.0).Also adds a short "Release builds" note to the README.
Fixes #9