Skip to content
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

Standalone builds for macOS aarch64 (aka arm64, Apple Silicon, M1/M2) #357

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Feb 1, 2024

GitHub released public runners.¹ Great timing too, as I was just about
to look into using the ARM hardware that's available for macOS with
GitHub's (paid) large runners². This also beats operating a self-hosted
runner, whether that's on EC2³ or our own Mac Mini.⁴

And the icing on the cake is that everything Just Worked by merely
enabling builds for this architecture. \o/ High fives all around,
everyone.

Changes to the standalone installer to follow separately⁵, as those need
to be held for merge until after the first release with these builds
available.

¹ https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
² https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1706556690621389
³ https://github.com/tsibley/blab-standup/blob/e7e2516fc40856a94b54eb83077d8f4bafd16914/2022-09-14.md
https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1670979565748349?thread_ts=1670963819.691499&cid=C01LCTT7JNN
#358

Checklist

  • Checks pass

GitHub released public runners.¹  Great timing too, as I was just about
to look into using the ARM hardware that's available for macOS with
GitHub's (paid) large runners².  This also beats operating a self-hosted
runner, whether that's on EC2³ or our own Mac Mini.⁴

And the icing on the cake is that everything Just Worked by merely
enabling builds for this architecture.  \o/  High fives all around,
everyone.

Changes to the standalone installer to follow separately⁵, as those need
to be held for merge until after the first release with these builds
available.

¹ <https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/>
² <https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1706556690621389>
³ <https://github.com/tsibley/blab-standup/blob/e7e2516fc40856a94b54eb83077d8f4bafd16914/2022-09-14.md>
⁴ <https://bedfordlab.slack.com/archives/C01LCTT7JNN/p1670979565748349?thread_ts=1670963819.691499&cid=C01LCTT7JNN>
⁵ <#358>
tsibley added a commit that referenced this pull request Feb 1, 2024
For merge to master after the first release with aarch64 builds
available.¹

¹ <#357>
@tsibley tsibley changed the title wip! macOS aarch64 (aka arm64, Apple Silicon, M1/M2) standalone builds Standalone builds for macOS aarch64 (aka arm64, Apple Silicon, M1/M2) Feb 1, 2024
@tsibley tsibley marked this pull request as ready for review February 1, 2024 19:57
@tsibley tsibley requested a review from a team February 1, 2024 19:57
@tsibley
Copy link
Member Author

tsibley commented Feb 1, 2024

This can be tested on your own machine with:

  curl -fsSL --proto '=https' https://github.com/nextstrain/cli/raw/trs/standalone-installers/macos-aarch64/bin/standalone-installer-unix \
| bash -s pr-build/357

tsibley added a commit that referenced this pull request Feb 1, 2024
For merge to master after the first release with aarch64 builds
available.¹

¹ <#357>
tsibley added a commit to nextstrain/docs.nextstrain.org that referenced this pull request Feb 1, 2024
Copy link
Member

@corneliusroemer corneliusroemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me
image

@tsibley tsibley merged commit c599a9a into master Feb 1, 2024
39 checks passed
@tsibley tsibley deleted the trs/macos-aarch64 branch February 1, 2024 23:49
tsibley added a commit that referenced this pull request Feb 2, 2024
When on macOS on aarch64 hardware, the Conda runtime currently requires
Rosetta.  The Docker runtime does not require it, but can benefit from it
because our aarch64 image isn't totally free of x86_64 code (yet?),
so emulation is required and Rosetta is faster than QEMU.

The standalone installer still checks for Rosetta as we previously
didn't produce aarch64 standalone binaries¹, but that check will be
made conditional on Nextstrain CLI version in a subsequent commit.

¹ <#357>
tsibley added a commit that referenced this pull request Feb 2, 2024
When on macOS on aarch64 hardware, the Conda runtime currently requires
Rosetta.  The Docker runtime does not require it, but can benefit from it
because our aarch64 image isn't totally free of x86_64 code (yet?),
so emulation is required and Rosetta is faster than QEMU.

The standalone installer still checks for Rosetta as we previously
didn't produce aarch64 standalone binaries¹, but that check will be made
conditional on Nextstrain CLI version in a subsequent commit² after the
first release of aarch64 support and these new Rosetta checks.

¹ <#357>
² <#358>
tsibley added a commit that referenced this pull request Feb 2, 2024
Conditions on the Nextstrain CLI version being requested, as aarch64
builds¹ will only be available going forward for new releases.  Assumes
the next release will be 8.2.0!

Disables Rosetta check when using an aarch64 build, as the checks will
be done at the runtime-level instead by `nextstrain setup` and
`nextstrain check-setup`.²

We must wait to merge this until after the first release (i.e. 8.2.0) of
the changes it depends on above.

¹ <#357>
² <#359>
tsibley added a commit that referenced this pull request Feb 2, 2024
When on macOS on aarch64 hardware, the Conda runtime currently requires
Rosetta.  The Docker runtime does not require it, but can benefit from it
because our aarch64 image isn't totally free of x86_64 code (yet?),
so emulation is required and Rosetta is faster than QEMU.

The standalone installer still checks for Rosetta as we previously
didn't produce aarch64 standalone binaries¹, but that check will be made
conditional on Nextstrain CLI version in a subsequent commit² after the
first release of aarch64 support and these new Rosetta checks.

¹ <#357>
² <#358>
tsibley added a commit that referenced this pull request Feb 2, 2024
Conditions on the Nextstrain CLI version being requested, as aarch64
builds¹ will only be available going forward for new releases.  Assumes
the next release will be 8.2.0!

Disables Rosetta check when using an aarch64 build, as the checks will
be done at the runtime-level instead by `nextstrain setup` and
`nextstrain check-setup`.²

We must wait to merge this until after the first release (i.e. 8.2.0) of
the changes it depends on above.

¹ <#357>
² <#361>
tsibley added a commit to nextstrain/docs.nextstrain.org that referenced this pull request Feb 2, 2024
… 8.2.0

Only the Conda runtime requires it.

Related-to: <nextstrain/cli#357>
Related-to: <nextstrain/cli#361>
Related-to: <nextstrain/cli#358>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants