-
Notifications
You must be signed in to change notification settings - Fork 8
Build binaries for macOS on the ARM64 architecture #4
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
Conversation
binary_artifacts: | ||
name: Binary assets | ||
path: "sbt/client/target/bin/sbtn" |
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.
We always build the binary and export it as a downloadable asset from the Cirrus CI UI.
We also set up a few commands in the script publish-macos-silicon.sh
that should publish the binary as a release asset, when the job is triggered by a release (I could not test that, though).
.cirrus/publish-macos-silicon.sh
Outdated
@@ -0,0 +1,9 @@ | |||
#!/bin/bash -ex | |||
|
|||
brew install sbt |
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.
Not sure if JDK is available, but if so I'd avoid Home Brew (this can be done post-merge).
brew install sbt | |
RUNNER_VER=1.8.2 | |
mkdir -p $HOME/bin | |
export PATH="$HOME/bin:$PATH" | |
curl -sL https://raw.githubusercontent.com/sbt/sbt/v$RUNNER_VER/sbt > $HOME/bin/sbt |
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.
It seems there is no JDK by default on the image (see here) and brew install sbt
installs both sbt and a JDK. What is the issue with using brew
?
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.
Generally I avoid it since we don't control it, and it installs a JDK as opposed to us picking a JDK explicitly. For the purpose of sbtn it probably doesn't matter much since we are launching GraalVM but normally we need to use JDK 8.
Overall LGTM |
Maybe we should also move aarch64 Linux build (currently using QEMU and super slow) to Cirrus CI as well? |
a54fc87
to
8b9c622
Compare
That sounds like a good idea, yes. However, I would prefer if that can be done later. |
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.
Thanks!
I merged it to trigger a build and I will adjust some configuration in a follow-up PR |
This PR shows how to set up Cirrus CI to build binaries for macOS on the ARM64 architecture.
If we merge it, we will have to also install the Cirrus CI GitHub app on the sbt/sbtn-dist repo.
I could not test the release workflow. Probably we need to cut a release from the main branch? I tried to push a tag and create a GitHub release from that but that did not trigger a build on the Cirrus CI side.
Relates to sbt/sbt#7143.