Skip to content

Commit 0ed0c97

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 0ed0c97

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 28 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,56 +124,42 @@ 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:
117128
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
118129
strategy:
119130
fail-fast: false
120131
matrix:
121-
node:
122-
- 24
123-
target:
124-
- linux/arm64
125-
variant:
126-
- bookworm
127-
- alpine3.20
128132
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 }})
133+
- runner: ubuntu-24.04-arm
134+
platform: linux/arm64
135+
arch: arm64
136+
- runner: ubuntu-24.04
137+
platform: linux/amd64
138+
arch: amd64
139+
runs-on: ${{ matrix.runner }}
140+
name: musl ${{ matrix.arch }}
134141
steps:
135142
- uses: actions/checkout@v6
136143

137-
- name: Set up QEMU
138-
uses: docker/setup-qemu-action@v4
139-
140-
- name: Setup Docker Buildx
141-
uses: docker/setup-buildx-action@v4
142-
143144
- name: Build binaries and test
144145
run: |
145-
docker buildx build \
146+
docker build \
146147
--file ./tools/BinaryBuilder.Dockerfile \
147-
--load \
148148
--tag sqlite-builder \
149-
--platform ${{ matrix.target }} \
150149
--no-cache \
151-
--build-arg VARIANT=${{ matrix.variant }} \
152-
--build-arg NODE_VERSION=${{ matrix.node }} \
150+
--build-arg VARIANT=alpine3.20 \
151+
--build-arg NODE_VERSION=24 \
153152
.
154153
CONTAINER_ID=$(docker create -it sqlite-builder)
155154
docker cp $CONTAINER_ID:/usr/src/build/prebuilds/ ./prebuilds
156155
157156
- name: Upload binaries to commit artifacts
158157
uses: actions/upload-artifact@v7
159-
if: matrix.node == 24
160158
with:
161-
name: prebuilt-binaries-${{ matrix.variant }}-${{ matrix.target == 'linux/arm64' && 'linux-arm64' || 'linux-amd64' }}
159+
name: prebuilt-binaries-musl-${{ matrix.arch }}
162160
path: prebuilds/*
163161
retention-days: 7
164162

165163
- name: Upload binaries to GitHub Release
166164
run: yarn install --ignore-scripts && yarn upload --upload-all ${{ github.token }}
167-
if: matrix.node == 24 && startsWith(github.ref, 'refs/tags/')
165+
if: startsWith(github.ref, 'refs/tags/')

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)