Skip to content

Commit 32015c3

Browse files
committed
Fixed Alpine/musl builds, replaced QEMU with native ARM runners
- gcc-preinclude.h: include <unistd.h> with _GNU_SOURCE active to provide syscall() on musl (fixes GCC 13 atomic_wait.h bug); use __GLIBC__ instead of __USE_GNU to guard glibc symbol versioning - CI: linux-arm64 glibc builds now use native ubuntu-24.04-arm runners instead of QEMU emulation (much faster) - CI: QEMU/Docker retained only for Alpine/musl builds (renamed to build-musl)
1 parent 20a3bd2 commit 32015c3

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ jobs:
4848
node: 24
4949
host: arm64
5050
target: arm64
51+
- os: ubuntu-24.04-arm
52+
node: 20
53+
host: arm64
54+
target: arm64
55+
- os: ubuntu-24.04-arm
56+
node: 22
57+
host: arm64
58+
target: arm64
59+
- os: ubuntu-24.04-arm
60+
node: 24
61+
host: arm64
62+
target: arm64
5163
name: ${{ matrix.os }} (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }})
5264
steps:
5365
- uses: actions/checkout@v6
@@ -112,8 +124,8 @@ jobs:
112124
run: yarn upload --upload-all ${{ github.token }}
113125
if: matrix.node == 24 && startsWith(github.ref, 'refs/tags/')
114126

115-
build-qemu:
116-
runs-on: ubuntu-latest
127+
build-musl:
128+
runs-on: ubuntu-24.04-arm
117129
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
118130
strategy:
119131
fail-fast: false
@@ -122,15 +134,10 @@ jobs:
122134
- 24
123135
target:
124136
- linux/arm64
137+
- linux/amd64
125138
variant:
126-
- bookworm
127139
- alpine3.20
128-
include:
129-
# musl x64 builds
130-
- target: linux/amd64
131-
variant: alpine3.20
132-
node: 24
133-
name: ${{ matrix.variant }} (node=${{ matrix.node }}, target=${{ matrix.target }})
140+
name: musl ${{ matrix.target == 'linux/arm64' && 'arm64' || 'amd64' }} (node=${{ matrix.node }})
134141
steps:
135142
- uses: actions/checkout@v6
136143

@@ -158,7 +165,7 @@ jobs:
158165
uses: actions/upload-artifact@v7
159166
if: matrix.node == 24
160167
with:
161-
name: prebuilt-binaries-${{ matrix.variant }}-${{ matrix.target == 'linux/arm64' && 'linux-arm64' || 'linux-amd64' }}
168+
name: prebuilt-binaries-musl-${{ matrix.target == 'linux/arm64' && 'arm64' || 'amd64' }}
162169
path: prebuilds/*
163170
retention-days: 7
164171

src/gcc-preinclude.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
#define _GNU_SOURCE
66
#include <features.h>
7+
#include <unistd.h>
78
#undef _GNU_SOURCE
89

9-
#if defined(__USE_GNU)
10+
#if defined(__GLIBC__)
1011

1112
#if defined(__x86_64__)
1213
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");

0 commit comments

Comments
 (0)