ci(binaries): build the macOS Intel asset on an Intel runner and assert binary architecture - #111
Merged
Merged
Conversation
…rt binary architecture The aisbom-macos-amd64 leg ran on an arm64 runner with an x64 Python requested. PyInstaller builds for the running interpreter's architecture, and the published Intel asset came out arm64. Build it on macos-15-intel instead, and read each binary's architecture with lipo/file before the smoke test so a mismatched build fails the release rather than being uploaded under the wrong name.
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.
Problem
The
aisbom-macos-amd64release asset is an arm64 binary. The leg ran onmacos-14(Apple Silicon) witharchitecture: x64requested fromsetup-python, but PyInstaller builds for the interpreter actually running it and produced arm64. The published v1.5.0 and v1.3.3 assets both reportMach-O 64-bit executable arm64underfileandlipo -archs.The existing smoke test couldn't catch this because it executes the binary on the runner that built it, where an arm64 build runs natively.
Change
macos-15-intel, so the binary is x86_64 and the smoke test really executes it on Intel.lipo -archson macOS,fileon Linux) and fails the job if it doesn't exactly match the leg'sexpected_arch. A mismatched build fails the release instead of being uploaded.Build aisbom-macos-amd64) instead of runner, so the two macOS legs no longer share a name and their logs can be told apart.Verification
This workflow only runs on
release: published, so I ran the full matrix on a temporary branch with a temporarypush:trigger and relaxed tag gates. That scaffolding is not in this PR, and the branch is deleted.Upload Release Assetstayed guarded byrefs/tags/and was skipped in both runs.macos-14. It failed as intended at the new step withFAIL: aisbom-macos-amd64 is 'arm64', expected 'x86_64'.aisbom-linux-amd64:ELF 64-bit LSB executable, x86-64aisbom-macos-amd64: runnerDarwin x86_64,Mach-O 64-bit executable x86_64aisbom-macos-arm64: runnerDarwin arm64,Mach-O 64-bit executable arm64lipo -archsgavex86_64for the Intel asset andarm64for the ARM asset. The Intel binary's minimum macOS version is 10.13 (LC_VERSION_MIN_MACOSX), and the arm64 one is unchanged at 11.0.