fix(release): repair ARM64 package builds (#411)

Define the ARMv8 assembler macro for legacy AArch64 cross-compilers used by the npm and PyPI release matrices, and keep independent targets running when one fails.
This commit is contained in:
Abimael Martell
2026-08-17 10:52:32 -07:00
committed by GitHub
parent ca6d667146
commit 06a9bab6b3
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -86,12 +86,14 @@ jobs:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker-options: -e CFLAGS_aarch64_unknown_linux_gnu=-D__ARM_ARCH=8
# macos-13 was retired by GitHub; macos-15-intel is the remaining
# Intel runner label (available through 2027).
- os: macos-15-intel
@@ -113,6 +115,9 @@ jobs:
target: ${{ matrix.target }}
args: --release --out dist
manylinux: auto
# The manylinux AArch64 GCC omits this macro while preprocessing
# ring's assembly. AArch64 is ARMv8 by definition.
docker-options: ${{ matrix.docker-options }}
- name: Upload wheel
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+6
View File
@@ -60,6 +60,7 @@ jobs:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
@@ -70,6 +71,7 @@ jobs:
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
build-flags: --use-napi-cross
cflags: -D__ARM_ARCH=8
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
build-flags: -x
@@ -126,6 +128,10 @@ jobs:
- name: Build native addon
working-directory: napi
env:
# napi-cross's old AArch64 GCC omits this predefined macro while
# preprocessing ring's assembly. AArch64 is ARMv8 by definition.
CFLAGS_aarch64_unknown_linux_gnu: ${{ matrix.cflags }}
run: bunx napi build --platform --release --target ${{ matrix.target }} ${{ matrix.build-flags }}
- name: Upload native binary