Skip to content

Commit 5d38bd4

Browse files
committed
fix(workflow): update linux-musl arm64 job to use Docker for building and testing
1 parent 67beb6b commit 5d38bd4

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
- os: ubuntu-24.04-arm
3232
arch: arm64
3333
name: linux-musl
34-
make: CC=musl-gcc CURL_CONFIG="--with-openssl=/usr/local/musl"
3534
- os: macos-latest
3635
name: macos
3736
- os: windows-latest
@@ -82,20 +81,23 @@ jobs:
8281
if: matrix.name == 'linux-musl' && matrix.arch == 'x86_64'
8382
run: apk update && apk add --no-cache gcc make curl sqlite openssl-dev musl-dev linux-headers
8483

85-
- name: linux-musl arm64 install dependencies
84+
- name: linux-musl arm64 build in docker
8685
if: matrix.name == 'linux-musl' && matrix.arch == 'arm64'
8786
run: |
88-
sudo apt-get update
89-
sudo apt-get install -y gcc make curl sqlite3 musl-dev musl-tools linux-libc-dev wget
90-
91-
# Build OpenSSL for musl
92-
wget https://www.openssl.org/source/openssl-3.0.15.tar.gz
93-
tar -xzf openssl-3.0.15.tar.gz
94-
cd openssl-3.0.15
95-
CC=musl-gcc CPPFLAGS="-I/usr/include" ./Configure linux-aarch64 --prefix=/usr/local/musl --openssldir=/usr/local/musl/ssl no-shared
96-
make -j$(nproc)
97-
sudo make install
98-
cd ..
87+
docker run --rm \
88+
--platform linux/arm64 \
89+
-v ${{ github.workspace }}:/workspace \
90+
-w /workspace \
91+
-e CONNECTION_STRING="${{ env.CONNECTION_STRING }}" \
92+
-e APIKEY="${{ env.APIKEY }}" \
93+
-e WEBLITE="${{ env.WEBLITE }}" \
94+
alpine:latest \
95+
sh -c '
96+
apk update && apk add --no-cache git gcc make curl sqlite openssl-dev musl-dev linux-headers
97+
git config --global --add safe.directory "*"
98+
make extension
99+
make test
100+
'
99101
100102
- name: windows build curl
101103
if: matrix.os == 'windows-latest'
@@ -107,6 +109,7 @@ jobs:
107109
run: sudo apt install wabt
108110

109111
- name: build sqlite-sync
112+
if: matrix.name != 'linux-musl' || matrix.arch != 'arm64'
110113
run: make extension ${{ matrix.make && matrix.make || ''}}
111114

112115
- name: windows install sqlite3
@@ -161,7 +164,7 @@ jobs:
161164
adb shell "sh /data/local/tmp/commands.sh"
162165
163166
- name: test sqlite-sync
164-
if: contains(matrix.name, 'linux') || matrix.name == 'windows'
167+
if: (contains(matrix.name, 'linux') || matrix.name == 'windows') && !(matrix.name == 'linux-musl' && matrix.arch == 'arm64')
165168
run: make test
166169

167170
- name: test sqlite-sync + coverage

0 commit comments

Comments
 (0)