Universal builds for macOS#1820
Merged
Merged
Conversation
For macOS (Darwin), some users are running on Intel silicon (x86_64), some on Apple silicon (aarch64). The purpose of this commit is to generate a universal binary of alr for macOS, so that users won't need to specify which version they need -- the loader will select the appropriate binary. To do this, a new job 'build-macos-universal' runs after the 'build' job has completed (which implies completion of its runs on macos-13 (x86_64) and macos-14 (aarch64)). This job dowloads & unpacks the x86_64 build to x86_64/, and the aarch64 build to aarch64/. It then copies aarch64/ to universal/ (so as to include the additional information, and runs lipo to create the universal binary in universal/bin/alr. The new binary has to be marked as executable, don't know why. alr-nightly-bin-universal-macos.zip is created and uploaded to the release directory. * .github/workflows/nightly.yml (build-macos-universal): new.
For macOS (Darwin), some users are running on Intel silicon (x86_64), some on Apple silicon (aarch64). The purpose of this commit is to generate a universal binary of alr for macOS, so that users won't need to specify which version they need -- the loader will select the appropriate binary. To do this, a new job 'build-macos-universal' runs after the 'build' job has completed (which implies completion of its runs on macos-13 (x86_64) and macos-latest (aarch64)). This job dowloads & unpacks the latest prerelease x86_64 build to x86_64/, and the latest prerelease aarch64 build to aarch64/. It then runs lipo to create the universal binary in ./bin/alr. The new binary has to be marked as executable, don't know why. alr-<release]-bin-universal-macos.zip is created and uploaded to the release directory. * .github/workflows/ci-macos.yml (build-macos-universal): new.
Contributor
Author
|
Updated from master branch. |
Contributor
Author
Badly phrased, I think - "the loader will select the appropriate architecture from the single binary executable" might be clearer |
mosteo
reviewed
Jan 13, 2025
mosteo
reviewed
Jan 13, 2025
mosteo
reviewed
Jan 13, 2025
Remove two steps that were inserted to check that no
com.apple.quarantine attributes were applied when the individual
architecture builds were downloaded (none were applied).
* .github/workflows/nightly.yml (build-macos-universal):
(check x86_64 attributes): remove.
(check aarch64 attributes): remove.
mosteo
approved these changes
Jan 14, 2025
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.
For macOS (Darwin), some users are running on Intel silicon (
x86_64), some on Apple silicon (aarch64). The purpose of this PR is to generate universal binaries ofalrfor macOS, so that users won't need to specify which version they need -- the loader will select the appropriate binary.To do this, in both the
nightly.ymland theci-macos.ymlworkflows a new jobbuild-macos-universalruns after thebuildjob has completed (which implies completion of its runs onmacos-13(x86_64) andmacos-14ormacos-latest(aarch64)).This job dowloads & unpacks the
x86_64build tox86_64/, and theaarch64build toaarch64/. It then runslipoto create the universal binaryalr. The new binary has to be marked as executable, don't know why.alr-<release>-bin-universal-macos.zipis created and uploaded to the release directory.Notes:
aarch64,x86_64anduniversalare created, mainly because I didn’t know how otherwise to preserve the outputs of the two parallel build matrix runs. This could cause confusion, which should be minimised when we update the ada-lang-io and alire.ada.dev sitesRELEASE.datetc), so I copied it from theaarch64build.