Skip to content

Commit 9b74fc1

Browse files
committed
fix(workflow): refactor linux-musl arm64 build to use Docker for dependency installation and execution
1 parent 6d24c5d commit 9b74fc1

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,19 @@ jobs:
8181
if: matrix.name == 'linux-musl' && matrix.arch == 'x86_64'
8282
run: apk update && apk add --no-cache gcc make curl sqlite openssl-dev musl-dev linux-headers
8383

84-
- name: linux-musl arm64 build in docker
84+
- name: linux-musl arm64 setup container
8585
if: matrix.name == 'linux-musl' && matrix.arch == 'arm64'
8686
run: |
87-
docker run --rm \
87+
docker run -d --name alpine \
8888
--platform linux/arm64 \
8989
-v ${{ github.workspace }}:/workspace \
9090
-w /workspace \
9191
-e CONNECTION_STRING="${{ env.CONNECTION_STRING }}" \
9292
-e APIKEY="${{ env.APIKEY }}" \
9393
-e WEBLITE="${{ env.WEBLITE }}" \
9494
alpine:latest \
95-
sh -c '
96-
set -e
97-
apk update && apk add --no-cache gcc make curl sqlite openssl-dev musl-dev linux-headers
98-
make extension
99-
make test
100-
'
95+
tail -f /dev/null
96+
docker exec alpine sh -c "apk update && apk add --no-cache gcc make curl sqlite openssl-dev musl-dev linux-headers"
10197
10298
- name: windows build curl
10399
if: matrix.os == 'windows-latest'
@@ -109,8 +105,7 @@ jobs:
109105
run: sudo apt install wabt
110106

111107
- name: build sqlite-sync
112-
if: matrix.name != 'linux-musl' || matrix.arch != 'arm64'
113-
run: make extension ${{ matrix.make && matrix.make || ''}}
108+
run: ${{ matrix.name == 'linux-musl' && matrix.arch == 'arm64' && 'docker exec alpine' || '' }} make extension ${{ matrix.make && matrix.make || ''}}
114109

115110
- name: windows install sqlite3
116111
if: matrix.os == 'windows-latest'
@@ -164,8 +159,8 @@ jobs:
164159
adb shell "sh /data/local/tmp/commands.sh"
165160
166161
- name: test sqlite-sync
167-
if: (contains(matrix.name, 'linux') || matrix.name == 'windows') && !(matrix.name == 'linux-musl' && matrix.arch == 'arm64')
168-
run: make test
162+
if: contains(matrix.name, 'linux') || matrix.name == 'windows'
163+
run: ${{ matrix.name == 'linux-musl' && matrix.arch == 'arm64' && 'docker exec alpine' || '' }} make test
169164

170165
- name: test sqlite-sync + coverage
171166
if: matrix.name == 'macos'

0 commit comments

Comments
 (0)