mas-cli / homebrew-tap

🍻🚰📦 mas Homebrew tap with bottles for older macOS versions.
MIT License
25 stars 3 forks source link

🍺 Bottling should produce architecture-specific binaries #23

Open chris-araman opened 3 years ago

chris-araman commented 3 years ago

The Homebrew maintainers have been intentionally keeping universal binaries out of Homebrew.

Currently, script/bottle produces a universal (x86_64 and arm64) bottle. It then duplicates this bottle for all supported macOS releases: 10.11 through 10.14 (x86_64) and 11 (x86_64 and arm).

We should use GitHub Actions to generate an x86_64 bottle for x86_64 macOS releases and an arm64 bottle for arm64 macOS releases. Unfortunately, this is currently blocked on having arm64 runners with macOS 11.

After https://github.com/mas-cli/mas/pull/365, the homebrew-core formula will build architecture-specific bottles.

chris-araman commented 3 years ago

Alternatively, we could provide a cask with a universal binary, since we can't really build a formula from source on these platforms anyway. Does that sound reasonable, @phatblat?

phatblat commented 3 years ago

I've got an M1 mini now but haven't had time to set it up as a GitHub actions runner yet. Looks like some people have been successful.

While the build script currently builds for "current" or "all" architectures, could we build different machine-specific bottles on the same box?

chris-araman commented 3 years ago

Cool!

Yes, Intel and M1 Macs can both build x86_64 or arm64 binaries by passing the --triple $ARCH-apple-macosx flag to swift build. Only the M1 Macs can run both binaries.