From f24763d54033cdd02ea2e07816dba6a702794557 Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Thu, 6 Nov 2025 14:33:49 -0800 Subject: [PATCH] Standalone builds for Linux aarch64 (aka arm64) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub released public runners.¹ This will ultimately let us use standalone installation archives in our linux/arm64 Docker images.² 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. ¹ ² ³ --- .github/actions/run-integration-tests/action.yaml | 8 ++++---- .github/actions/setup-integration-tests/action.yaml | 13 +++++++++++-- .github/workflows/ci.yaml | 10 ++++++++++ CHANGES.md | 8 ++++++++ devel/pyoxidizer | 2 +- doc/changes.md | 9 +++++++++ 6 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/actions/run-integration-tests/action.yaml b/.github/actions/run-integration-tests/action.yaml index 78274f6b..fb7d1496 100644 --- a/.github/actions/run-integration-tests/action.yaml +++ b/.github/actions/run-integration-tests/action.yaml @@ -24,11 +24,11 @@ runs: shell: bash -l -eo pipefail {0} run: nextstrain setup docker - - if: runner.os != 'Windows' + - if: runner.os != 'Windows' && !(runner.os == 'Linux' && runner.arch == 'ARM64') shell: bash -l -eo pipefail {0} run: nextstrain setup conda - - if: runner.os != 'macOS' && runner.os != 'Windows' + - if: runner.os != 'macOS' && runner.os != 'Windows' && !(runner.os == 'Linux' && runner.arch == 'ARM64') shell: bash -l -eo pipefail {0} run: nextstrain setup singularity @@ -45,14 +45,14 @@ runs: git -C zika-tutorial clean -dfqx nextstrain build --docker --cpus 2 zika-tutorial - - if: runner.os != 'Windows' + - if: runner.os != 'Windows' && !(runner.os == 'Linux' && runner.arch == 'ARM64') name: Build zika-tutorial with --conda shell: bash -l -eo pipefail {0} run: | git -C zika-tutorial clean -dfqx nextstrain build --conda --cpus 2 zika-tutorial - - if: runner.os != 'macOS' && runner.os != 'Windows' + - if: runner.os != 'macOS' && runner.os != 'Windows' && !(runner.os == 'Linux' && runner.arch == 'ARM64') name: Build zika-tutorial with --singularity shell: bash -l -eo pipefail {0} run: | diff --git a/.github/actions/setup-integration-tests/action.yaml b/.github/actions/setup-integration-tests/action.yaml index cb690b97..b1047ed5 100644 --- a/.github/actions/setup-integration-tests/action.yaml +++ b/.github/actions/setup-integration-tests/action.yaml @@ -25,6 +25,15 @@ inputs: runs: using: composite steps: + # Our aarch64 (linux/arm64) image still contains some x86_64 (amd64) + # executables and so requires the ability of the host to emulate x86_64. + # On macOS, which is the primary reason we have an aarch64 image, this is + # expected to be provided by Rosetta 2. On Linux, we expect it to be QEMU, + # which we set up here. + - if: runner.os == 'Linux' && runner.arch == 'ARM64' + run: docker run --privileged --rm tonistiigi/binfmt --install amd64 + shell: bash -l -eo pipefail {0} + - uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{ inputs.python-version }} @@ -72,14 +81,14 @@ runs: python3 --version | grep -F 'Python ${{ inputs.python-version }}.' [[ "$(python --version)" == "$(python3 --version)" ]] - # Install Singularity on Linux. + # Install Singularity on Linux x86_64. # # We don't install it with Conda because Conda Forge provides a non-suid # build of Singularity. We're compatible with Singularity's non-suid mode, # but production usages of Singularity are likely to use its suid mode, so # I'd rather test against that. # -trs, 6 Jan 2023 - - if: runner.os == 'Linux' + - if: runner.os == 'Linux' && runner.arch == 'X64' shell: bash -l -eo pipefail {0} env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 869ba1eb..33af8595 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -106,6 +106,10 @@ jobs: target: x86_64-unknown-linux-gnu exe: nextstrain + - os: ubuntu-22.04-arm + target: aarch64-unknown-linux-gnu + exe: nextstrain + - os: macos-13 target: x86_64-apple-darwin exe: nextstrain @@ -299,6 +303,8 @@ jobs: include: - { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu } - { os: ubuntu-24.04, target: x86_64-unknown-linux-gnu } + - { os: ubuntu-22.04-arm, target: aarch64-unknown-linux-gnu } + - { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-gnu } - { os: macos-13, target: x86_64-apple-darwin } - { os: macos-14, target: x86_64-apple-darwin } - { os: macos-15, target: x86_64-apple-darwin } @@ -381,6 +387,10 @@ jobs: with: name: standalone-x86_64-unknown-linux-gnu + - uses: actions/download-artifact@v5 + with: + name: standalone-aarch64-unknown-linux-gnu + - uses: actions/download-artifact@v5 with: name: standalone-x86_64-apple-darwin diff --git a/CHANGES.md b/CHANGES.md index 40c73889..3b8291e2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,14 @@ development source code and as such may not be routinely kept up to date. # __NEXT__ +## Improvements + +* We now produce standalone installation archives for Linux running on aarch64 + hardware (aka arm64). The standalone installer will use these archives + starting with this release. + ([#489](https://github.com/nextstrain/cli/pull/489), + [#490](https://github.com/nextstrain/cli/pull/490)) + # 10.4.1 (14 October 2025) diff --git a/devel/pyoxidizer b/devel/pyoxidizer index 4b4feac1..fcc1d397 100755 --- a/devel/pyoxidizer +++ b/devel/pyoxidizer @@ -27,7 +27,7 @@ main() { --volume "$build/cache/pyoxidizer:/tmp/.cache/pyoxidizer" \ --volume "$build/cache/pip:/tmp/.cache/pip" \ --volume "$build/cache/cargo:/tmp/.cargo" \ - quay.io/pypa/manylinux2014_x86_64 "$pyoxidizer" "$@" + quay.io/pypa/manylinux2014_"$(platform-machine)" "$pyoxidizer" "$@" else exec "$pyoxidizer" "$@" fi diff --git a/doc/changes.md b/doc/changes.md index 6bfc92c5..9a32a76d 100644 --- a/doc/changes.md +++ b/doc/changes.md @@ -16,6 +16,15 @@ development source code and as such may not be routinely kept up to date. (v-next)= ## __NEXT__ +(v-next-improvements)= +### Improvements + +* We now produce standalone installation archives for Linux running on aarch64 + hardware (aka arm64). The standalone installer will use these archives + starting with this release. + ([#489](https://github.com/nextstrain/cli/pull/489), + [#490](https://github.com/nextstrain/cli/pull/490)) + (v10-4-1)= ## 10.4.1 (14 October 2025)