Skip to content

Commit 4f05c64

Browse files
committed
Replace Alpine container with musl-tools on Ubuntu for portable builds
Alpine containers on ARM64 runners break GitHub Actions JS-based actions (checkout, upload-artifact). Use musl-gcc on Ubuntu instead.
1 parent c986b40 commit 4f05c64

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/_build.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ jobs:
136136
path: "*.zip"
137137

138138
build-linux-portable:
139+
# Static musl builds — uses musl-tools on Ubuntu (not Alpine containers,
140+
# which break on ARM64 due to GitHub Actions JS action limitation).
139141
strategy:
140142
fail-fast: false
141143
matrix:
@@ -145,17 +147,21 @@ jobs:
145147
- arch: arm64
146148
runner: ubuntu-24.04-arm
147149
runs-on: ${{ matrix.runner }}
148-
container:
149-
image: alpine:3.21
150150
timeout-minutes: 15
151151
steps:
152152
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
153153

154154
- name: Install musl build deps
155-
run: apk add --no-cache build-base linux-headers zlib-dev zlib-static nodejs npm bash
155+
run: |
156+
sudo apt-get update
157+
sudo apt-get install -y musl-tools zlib1g-dev nodejs npm
158+
159+
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
160+
with:
161+
node-version: "22"
156162

157-
- name: Build standard binary (static)
158-
run: scripts/build.sh ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=gcc CXX=g++ STATIC=1
163+
- name: Build standard binary (static musl)
164+
run: scripts/build.sh ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=musl-gcc CXX=g++ STATIC=1
159165

160166
- name: Verify static linking
161167
run: file build/c/codebase-memory-mcp | grep -q "statically linked"
@@ -166,8 +172,8 @@ jobs:
166172
tar -czf codebase-memory-mcp-linux-${{ matrix.arch }}-portable.tar.gz \
167173
-C build/c codebase-memory-mcp LICENSE install.sh
168174
169-
- name: Build UI binary (static)
170-
run: scripts/build.sh --with-ui ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=gcc CXX=g++ STATIC=1
175+
- name: Build UI binary (static musl)
176+
run: scripts/build.sh --with-ui ${{ inputs.version && format('--version {0}', inputs.version) || '' }} CC=musl-gcc CXX=g++ STATIC=1
171177

172178
- name: Archive UI binary
173179
run: |

0 commit comments

Comments
 (0)