-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build and Release for Mac Arm64 architecture #1030
Conversation
I haven't added in any functionality to build for darwin yet, I'm going to investigate and add that on Monday. |
After examining the problem more, we're blocked on adding support for Arm by buildpacks/lifecycle#435. I'll refocus this on adding support for Mac M1. |
This is a WIP, to construct pack for multiple other architectures. Specifically for linux and Mac arm64, and for armv7. Signed-off-by: David Freilich <dfreilich@vmware.com>
Signed-off-by: David Freilich <dfreilich@vmware.com>
3d41f54
to
5336f32
Compare
@@ -98,10 +98,37 @@ jobs: | |||
with: | |||
name: pack-${{ matrix.os }} | |||
path: out/${{ env.PACK_BIN }} | |||
release: | |||
build-additional-archs: | |||
if: ${{ startsWith(github.ref, 'refs/heads/release/') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figure that it only really makes sense to do if this is a release branch, though happy to make it happen regardless so we can always check the binary and make sure it works
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- goarch: arm64 | ||
goos: darwin | ||
name: macos-arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be more than we need now, but I was planning this for expanding eventually to different arm
architectures
@@ -5,7 +5,10 @@ | |||
class Pack < Formula | |||
desc "A CLI for building apps using Cloud Native Buildpacks" | |||
homepage "https://github.com/buildpacks/pack" | |||
if OS.mac? | |||
if OS.mac? && Hardware::CPU.arm? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was based off how openJDK added Mac ARM support: Homebrew/homebrew-core#68946
Summary
This is a WIP, to construct pack for multiple other architectures. Specifically for linux and Mac arm64, and for armv7.After investigating, I put linux
arm64
andarm7
on hold, due to requiring changes in the lifecycle. Mac M1, on the other hand, can successfully build applications, albeit slowly (due to the lifecycle not having a matching release). As such, this PR builds a Mac Arm64 binary and adds it to our releases. Further, it adds it to our Homebrew tap.Documentation
Related
Resolves #1003