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-installer-unix: Use new aarch64 builds for macOS #358

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Feb 1, 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

Checklist

@tsibley tsibley force-pushed the trs/standalone-installers/macos-aarch64 branch from 7ea390a to 9e86268 Compare February 1, 2024 20:22
@tsibley tsibley marked this pull request as ready for review February 1, 2024 20:25
@tsibley tsibley requested a review from a team February 1, 2024 20:27
tsibley added a commit to nextstrain/docs.nextstrain.org that referenced this pull request Feb 1, 2024
CHANGES.md Outdated Show resolved Hide resolved
tsibley added a commit that referenced this pull request 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>
Base automatically changed from trs/macos-aarch64 to master February 1, 2024 23:49
@tsibley tsibley force-pushed the trs/standalone-installers/macos-aarch64 branch from 9e86268 to 3ccbd10 Compare February 2, 2024 22:33
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 tsibley force-pushed the trs/standalone-installers/macos-aarch64 branch from 3ccbd10 to 4ed2952 Compare February 2, 2024 22:52
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 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 tsibley force-pushed the trs/standalone-installers/macos-aarch64 branch from 4ed2952 to 7eaaf61 Compare February 2, 2024 22:54
@tsibley tsibley changed the base branch from master to trs/rosetta-checks February 2, 2024 22:55
@tsibley tsibley changed the title standalone-installer-unix: Use new macOS on aarch64 builds standalone-installer-unix: Use new aarch64 builds for macOS Feb 2, 2024
@tsibley tsibley requested review from a team and jameshadfield February 2, 2024 22:57
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>
Base automatically changed from trs/rosetta-checks to master February 6, 2024 18:21
@tsibley tsibley merged commit 9e1be08 into master Feb 7, 2024
46 checks passed
@tsibley tsibley deleted the trs/standalone-installers/macos-aarch64 branch February 7, 2024 00:50
tsibley added a commit to nextstrain/nextstrain.org that referenced this pull request Feb 12, 2024
…loads

This allows URLs like:

    https://nextstrain.org/cli/download/>=7.4.0/standalone-x86_64-unknown-linux-gnu.tar.gz

which will let us use the standalone installer, e.g.

    curl -fsSL --proto '=https' https://nextstrain.org/cli/installer/linux | bash -s '>=7.4.0'

in automated contexts where we want to be able to declare constraints
like lower version bounds or incompatible versions.

Note that the standalone installer on macOS on aarch64 hardware does
very rudimentary version comparison¹ to decide if the requested version
is older or newer than the first release with actual aarch64 support
(8.2.0), and it won't compare version range constraints correctly:
they'll always be considered greater than (newer/later) than 8.2.0.  But
I expect this to be fine in practice and not matter for actual usage.

We depend on an older version of @renovatebot/pep440 (<3) because >=3
adds a dependency on Node >=18 and this codebase is still on Node 16.  I
reviewed the changelog for newer versions of the package and nothing
else substantial seems to have changed anyhow.

Related-to: <nextstrain/.github#55>

¹ <nextstrain/cli#358>
  <https://github.com/nextstrain/cli/blob/af976b06/bin/standalone-installer-unix#L146-L154>
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