feat: use native arm64 runner for aarch64 builds (#142)

- closes #141
This commit is contained in:
Michael Kriese 2026-01-12 17:57:46 +01:00 committed by GitHub
parent eacb3c0090
commit a024a39fb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 44 deletions

View File

@ -5,13 +5,21 @@ on:
workflow_call:
jobs:
linux-x64:
runs-on: ubuntu-22.04
linux:
runs-on: ${{ matrix.arch.os }}
name: linux-${{ matrix.arch.name }} (${{ matrix.target-node }})
strategy:
fail-fast: false
matrix:
target-node: [20, 22, 24]
arch:
- name: x64
os: ubuntu-22.04
platform: amd64
- name: arm64
os: ubuntu-22.04-arm
platform: arm64
steps:
- uses: actions/checkout@v4
@ -27,7 +35,7 @@ jobs:
PKG_FETCH_OPTION_n=node${{ matrix.target-node }}
context: .
file: ./Dockerfile.linux
platforms: linux/amd64
platforms: linux/${{ matrix.arch.platform }}
outputs: type=local, dest=dist
- name: Check if binary is compiled, skip if download only
@ -39,44 +47,6 @@ jobs:
- uses: actions/upload-artifact@v4
if: steps.check_file.outputs.EXISTS == 'true'
with:
name: node${{ matrix.target-node }}-linux-x64
path: dist/*
linux-arm64:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
target-node: [20, 22, 24]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
id: build
uses: docker/build-push-action@v5
with:
build-args: |
TARGET_TOOLCHAIN_ARCH=aarch64
PKG_FETCH_OPTION_a=arm64
PKG_FETCH_OPTION_n=node${{ matrix.target-node }}
context: .
file: ./Dockerfile.linuxcross
platforms: linux/amd64
outputs: type=local, dest=dist
- name: Check if binary is compiled, skip if download only
id: check_file
run: |
ls -l dist
(test -f dist/*.sha256sum && echo "EXISTS=true" >> $GITHUB_OUTPUT) || echo "EXISTS=false" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
if: steps.check_file.outputs.EXISTS == 'true'
with:
name: node${{ matrix.target-node }}-linux-arm64
name: node${{ matrix.target-node }}-linux-${{ matrix.arch.name }}
path: dist/*

View File

@ -7,7 +7,9 @@ WORKDIR /root/pkg-fetch/
RUN dnf install -y oracle-epel-release-el8 oraclelinux-developer-release-el8
# Enable the developer repo for devtoolset and python36
RUN dnf config-manager --enable ol8_UEKR6 ol8_addons ol8_developer ol8_developer_EPEL
RUN dnf config-manager --enable ol8_addons ol8_developer ol8_developer_EPEL
# `ol8_UEKR6` doesn't exist on aarch64
RUN uname -p | grep -s aarch64 || dnf config-manager --enable ol8_UEKR6
# Upgrade all packages
RUN dnf upgrade -y