fix(ci): fix Node.js ARM64 musl build - use apk mode instead of cross

- V2 build now uses Alpine nodejs-current package (v23.x)
- V1 build now uses Alpine nodejs LTS package (v22.x)
- Add PKG_TYPE environment variable to select package type
- Update release notes to reflect new build approach

The cross-compilation mode failed because Node.js official glibc binary
cannot be converted to musl via patchelf due to glibc-specific dynamic
linker dependencies.
This commit is contained in:
10000ge10000
2026-03-17 02:30:34 +08:00
parent 1df1a4170b
commit 9d0012629b
2 changed files with 22 additions and 10 deletions

View File

@@ -34,16 +34,17 @@ jobs:
with:
platforms: linux/arm64
- name: Build Node.js V1 ARM64 musl (apk mode)
- name: Build Node.js V1 ARM64 musl (apk lts mode)
run: |
NODE_VER="22.15.1"
mkdir -p dist
echo "=== Building Node.js v${NODE_VER} ARM64 musl (apk mode) ==="
echo "=== Building Node.js v${NODE_VER} ARM64 musl (apk lts mode) ==="
docker run --rm --platform linux/arm64 \
-v "$PWD/dist:/output" \
-v "$PWD/scripts/build-node-musl.sh:/build-node-musl.sh:ro" \
-e "NODE_VER=${NODE_VER}" \
-e "BUILD_MODE=apk" \
-e "PKG_TYPE=lts" \
alpine:3.21 sh /build-node-musl.sh
- name: Build info
@@ -86,16 +87,17 @@ jobs:
with:
platforms: linux/arm64
- name: Build Node.js V2 ARM64 musl (cross mode)
- name: Build Node.js V2 ARM64 musl (apk current mode)
run: |
NODE_VER="22.16.0"
mkdir -p dist
echo "=== Building Node.js v${NODE_VER} ARM64 musl (cross mode) ==="
echo "=== Building Node.js v${NODE_VER}+ ARM64 musl (apk current mode) ==="
docker run --rm --platform linux/arm64 \
-v "$PWD/dist:/output" \
-v "$PWD/scripts/build-node-musl.sh:/build-node-musl.sh:ro" \
-e "NODE_VER=${NODE_VER}" \
-e "BUILD_MODE=cross" \
-e "BUILD_MODE=apk" \
-e "PKG_TYPE=current" \
alpine:3.21 sh /build-node-musl.sh
- name: Build info
@@ -167,12 +169,13 @@ jobs:
| 文件 | 版本 | 用途 |
|------|------|------|
| `node-v22.16.0-linux-arm64-musl.tar.xz` | V2 (当前) | OpenClaw v2026.3.11+ (要求 >= 22.16.0) |
| `node-v22.15.1-linux-arm64-musl.tar.xz` | V1 (旧版) | OpenClaw v2026.3.8 及更早版本 |
| `node-v23.x.x-linux-arm64-musl.tar.xz` | V2 (当前) | OpenClaw v2026.3.11+ (要求 >= 22.16.0) |
| `node-v22.x.x-linux-arm64-musl.tar.xz` | V1 (旧版) | OpenClaw v2026.3.8 及更早版本 |
## 构建模式
- **V2 (22.16.0)**: 交叉编译模式,从 Node.js 官方 glibc 版本转换为 musl
- **V1 (22.15.1)**: Alpine apk 模式,使用 Alpine 仓库的 Node.js
两种版本均使用 **Alpine apk 模式** 构建:
- **V2**: 使用 Alpine `nodejs-current` 包 (v23.x),满足 OpenClaw >= 22.16.0 的要求
- **V1**: 使用 Alpine `nodejs` LTS 包 (v22.x),兼容旧版 OpenClaw
`openclaw-env setup` 会在 ARM64 musl 设备上自动从此处下载合适的版本。