Skip to content

Commit 2c3ebd0

Browse files
committed
ci: build Linux Arm AOT on Arm runners
Enabling Native AOT makes the Linux CI jobs link a native binary for the target runtime. Cross-linking the Arm runtimes from the x64 ubuntu-latest runner has no target toolchain, so the linux-arm job fails at the clang link step. Run the Arm matrix entries on GitHub's Arm64 runners so linux-arm64 links natively, and install the armhf GNU toolchain (gcc-arm-linux-gnueabihf, which pulls in binutils and the sysroot) for the 32-bit linux-arm target, which still cross-compiles on the Arm64 host. Assisted-by: Claude Opus 4.8 Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent f331718 commit 2c3ebd0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/continuous-integration.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
# ================================
7777
linux:
7878
name: Linux
79-
runs-on: ubuntu-latest
79+
runs-on: ${{ matrix.runtime == 'linux-x64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
8080
strategy:
8181
matrix:
8282
runtime: [ linux-x64, linux-arm64, linux-arm ]
@@ -89,6 +89,13 @@ jobs:
8989
with:
9090
dotnet-version: 10.0.x
9191

92+
- name: Install cross-compilation toolchain (arm)
93+
if: matrix.runtime == 'linux-arm'
94+
run: |
95+
sudo apt-get update
96+
# Brings in cross-compilation toolchain for armhf including binutils
97+
sudo apt-get install -y gcc-arm-linux-gnueabihf
98+
9299
- name: Install dependencies
93100
run: dotnet restore
94101

0 commit comments

Comments
 (0)