mirror of
https://github.com/hotwa/luci-app-openclaw.git
synced 2026-03-30 20:25:44 +00:00
feat: upgrade arm64 musl node runtime to 24.14.1
This commit is contained in:
21
.github/workflows/build-node-musl.yml
vendored
21
.github/workflows/build-node-musl.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
build_v2:
|
build_v2:
|
||||||
description: 'Build V2 (23.2.0) - Current version'
|
description: 'Build V2 (24.14.1) - Current LTS version'
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
@@ -89,7 +89,7 @@ jobs:
|
|||||||
name: node-arm64-musl-v1
|
name: node-arm64-musl-v1
|
||||||
path: dist/*.tar.xz
|
path: dist/*.tar.xz
|
||||||
|
|
||||||
# ── V2 构建: 使用交叉编译模式 (23.2.0) ──
|
# ── V2 构建: 使用 Alpine edge apk 模式 (24.14.1 LTS) ──
|
||||||
build-v2:
|
build-v2:
|
||||||
name: Build Node.js V2 (Current)
|
name: Build Node.js V2 (Current)
|
||||||
if: ${{ inputs.build_v2 }}
|
if: ${{ inputs.build_v2 }}
|
||||||
@@ -108,23 +108,26 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
|
|
||||||
- name: Build Node.js V2 ARM64 musl (apk current mode)
|
- name: Build Node.js V2 ARM64 musl (apk lts mode)
|
||||||
run: |
|
run: |
|
||||||
NODE_VER="23.2.0"
|
NODE_VER="24.14.1"
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
echo "=== Building Node.js v${NODE_VER}+ ARM64 musl (apk current mode) ==="
|
echo "=== Building Node.js v${NODE_VER} ARM64 musl (apk lts mode) ==="
|
||||||
docker run --rm --platform linux/arm64 \
|
docker run --rm --platform linux/arm64 \
|
||||||
-v "$PWD/dist:/output" \
|
-v "$PWD/dist:/output" \
|
||||||
-v "$PWD/scripts/build-node-musl.sh:/build-node-musl.sh:ro" \
|
-v "$PWD/scripts/build-node-musl.sh:/build-node-musl.sh:ro" \
|
||||||
-e "NODE_VER=${NODE_VER}" \
|
-e "NODE_VER=${NODE_VER}" \
|
||||||
-e "BUILD_MODE=apk" \
|
-e "BUILD_MODE=apk" \
|
||||||
-e "PKG_TYPE=current" \
|
-e "PKG_TYPE=lts" \
|
||||||
alpine:3.21 sh /build-node-musl.sh
|
alpine:edge sh /build-node-musl.sh
|
||||||
|
|
||||||
- name: Build info
|
- name: Build info
|
||||||
id: build_info
|
id: build_info
|
||||||
run: |
|
run: |
|
||||||
|
EXPECTED_ARTIFACT="node-v24.14.1-linux-arm64-musl.tar.xz"
|
||||||
|
test -f "dist/${EXPECTED_ARTIFACT}"
|
||||||
ARTIFACT_NAME=$(ls dist/*.tar.xz | head -1 | xargs basename)
|
ARTIFACT_NAME=$(ls dist/*.tar.xz | head -1 | xargs basename)
|
||||||
|
test "${ARTIFACT_NAME}" = "${EXPECTED_ARTIFACT}"
|
||||||
echo "artifact_name=${ARTIFACT_NAME}" >> "$GITHUB_OUTPUT"
|
echo "artifact_name=${ARTIFACT_NAME}" >> "$GITHUB_OUTPUT"
|
||||||
echo "Artifact: ${ARTIFACT_NAME}"
|
echo "Artifact: ${ARTIFACT_NAME}"
|
||||||
|
|
||||||
@@ -211,13 +214,13 @@ jobs:
|
|||||||
|
|
||||||
| 文件 | 版本 | 用途 |
|
| 文件 | 版本 | 用途 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| `node-v23.2.0-linux-arm64-musl.tar.xz` | V2 (当前默认) | OpenClaw v2026.3.11+ (默认下载,满足 >= 22.16.0) |
|
| `node-v24.14.1-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 及更早版本 |
|
| `node-v22.x.x-linux-arm64-musl.tar.xz` | V1 (旧版) | OpenClaw v2026.3.8 及更早版本 |
|
||||||
|
|
||||||
## 构建模式
|
## 构建模式
|
||||||
|
|
||||||
两种版本均使用 **Alpine apk 模式** 构建:
|
两种版本均使用 **Alpine apk 模式** 构建:
|
||||||
- **V2**: 使用 Alpine `nodejs-current` 包 (v23.x),当前默认发布 `node-v23.2.0-linux-arm64-musl.tar.xz`
|
- **V2**: 使用 Alpine `edge` 的 `nodejs` LTS 包 (v24.x),当前默认发布 `node-v24.14.1-linux-arm64-musl.tar.xz`
|
||||||
- **V1**: 使用 Alpine `nodejs` LTS 包 (v22.x),兼容旧版 OpenClaw
|
- **V1**: 使用 Alpine `nodejs` LTS 包 (v22.x),兼容旧版 OpenClaw
|
||||||
|
|
||||||
`openclaw-env setup` 会在 ARM64 musl 设备上默认直连下载 V2 当前版本,必要时再回退到 Release 元数据解析。
|
`openclaw-env setup` 会在 ARM64 musl 设备上默认直连下载 V2 当前版本,必要时再回退到 Release 元数据解析。
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ set -e
|
|||||||
. /usr/libexec/openclaw-node.sh
|
. /usr/libexec/openclaw-node.sh
|
||||||
|
|
||||||
# ── Node.js 版本策略 ──
|
# ── Node.js 版本策略 ──
|
||||||
# V2: 当前推荐版本,用于 OpenClaw v2026.3.11+ (默认下载 23.2.0,满足 >= 22.16.0)
|
# V2: 当前推荐版本,用于 OpenClaw v2026.3.11+ (默认下载 24.14.1,满足 >= 22.16.0)
|
||||||
# V1: 保留给显式指定旧版环境时使用,不再作为 V2 的自动回退
|
# V1: 保留给显式指定旧版环境时使用,不再作为 V2 的自动回退
|
||||||
NODE_VERSION_V2="23.2.0"
|
NODE_VERSION_V2="24.14.1"
|
||||||
NODE_VERSION_V1="22.15.1"
|
NODE_VERSION_V1="22.15.1"
|
||||||
# 默认使用 V2 版本 (可通过 NODE_VERSION 环境变量覆盖)
|
# 默认使用 V2 版本 (可通过 NODE_VERSION 环境变量覆盖)
|
||||||
NODE_VERSION="${NODE_VERSION:-${NODE_VERSION_V2}}"
|
NODE_VERSION="${NODE_VERSION:-${NODE_VERSION_V2}}"
|
||||||
|
|||||||
@@ -28,7 +28,14 @@ grep -Fq 'verify_prefix /opt/openclaw/node' "$WORKFLOW" || fail "workflow should
|
|||||||
grep -Fq 'verify_prefix /tmp/custom-openclaw-root/openclaw/node' "$WORKFLOW" || fail "workflow should verify custom install path"
|
grep -Fq 'verify_prefix /tmp/custom-openclaw-root/openclaw/node' "$WORKFLOW" || fail "workflow should verify custom install path"
|
||||||
|
|
||||||
grep -Fq 'oc_node_version_ge "$installed_ver" "$node_ver"' "$ENV_SCRIPT" || fail "installer should enforce minimum node version after extraction"
|
grep -Fq 'oc_node_version_ge "$installed_ver" "$node_ver"' "$ENV_SCRIPT" || fail "installer should enforce minimum node version after extraction"
|
||||||
grep -Fq 'NODE_VERSION_V2="23.2.0"' "$ENV_SCRIPT" || fail "installer should default V2 to Node.js 23.2.0"
|
grep -Fq 'NODE_VERSION_V2="24.14.1"' "$ENV_SCRIPT" || fail "installer should default V2 to Node.js 24.14.1"
|
||||||
|
grep -Fq "description: 'Build V2 (24.14.1) - Current LTS version'" "$WORKFLOW" || fail "workflow should describe V2 as Node.js 24.14.1 LTS"
|
||||||
|
grep -Fq 'NODE_VER="24.14.1"' "$WORKFLOW" || fail "workflow should request Node.js 24.14.1 for V2"
|
||||||
|
grep -Fq 'Build Node.js V2 ARM64 musl (apk lts mode)' "$WORKFLOW" || fail "workflow should build V2 in apk lts mode"
|
||||||
|
grep -Fq 'PKG_TYPE=lts' "$WORKFLOW" || fail "workflow should use Alpine nodejs LTS package for V2"
|
||||||
|
grep -Fq 'alpine:edge sh /build-node-musl.sh' "$WORKFLOW" || fail "workflow should build V2 from Alpine edge to get the latest Node.js 24 LTS package"
|
||||||
|
grep -Fq 'EXPECTED_ARTIFACT="node-v24.14.1-linux-arm64-musl.tar.xz"' "$WORKFLOW" || fail "workflow should require the exact Node.js 24.14.1 V2 artifact name"
|
||||||
|
grep -Fq '`node-v24.14.1-linux-arm64-musl.tar.xz`' "$WORKFLOW" || fail "release notes should mention the Node.js 24.14.1 ARM64 musl tarball"
|
||||||
if grep -Fq 'mirror_list="$mirror_list ${NODE_SELF_HOST}/${v1_tarball}"' "$ENV_SCRIPT"; then
|
if grep -Fq 'mirror_list="$mirror_list ${NODE_SELF_HOST}/${v1_tarball}"' "$ENV_SCRIPT"; then
|
||||||
fail "installer should not auto-fallback from V2 to V1 tarball"
|
fail "installer should not auto-fallback from V2 to V1 tarball"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ if oc_normalize_node_version "broken-version" >/dev/null 2>&1; then
|
|||||||
fail "invalid version should not normalize"
|
fail "invalid version should not normalize"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
oc_node_version_ge "23.2.0" "23.2.0" || fail "exact version should satisfy requirement"
|
oc_node_version_ge "24.14.1" "24.14.1" || fail "exact version should satisfy requirement"
|
||||||
oc_node_version_ge "23.2.1" "23.2.0" || fail "newer patch should satisfy requirement"
|
oc_node_version_ge "24.14.2" "24.14.1" || fail "newer patch should satisfy requirement"
|
||||||
oc_node_version_ge "24.0.0" "23.2.0" || fail "newer major should satisfy requirement"
|
oc_node_version_ge "25.0.0" "24.14.1" || fail "newer major should satisfy requirement"
|
||||||
if oc_node_version_ge "22.15.1" "23.2.0"; then
|
if oc_node_version_ge "24.14.0" "24.14.1"; then
|
||||||
fail "older minor version should not satisfy requirement"
|
fail "older minor version should not satisfy requirement"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -71,8 +71,8 @@ cat > "$tmpdir/node-bins-release.json" <<'EOF'
|
|||||||
"browser_download_url": "https://github.com/hotwa/luci-app-openclaw/releases/download/node-bins/node-v22.15.1-linux-arm64-musl.tar.xz"
|
"browser_download_url": "https://github.com/hotwa/luci-app-openclaw/releases/download/node-bins/node-v22.15.1-linux-arm64-musl.tar.xz"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "node-v23.2.0-linux-arm64-musl.tar.xz",
|
"name": "node-v24.14.1-linux-arm64-musl.tar.xz",
|
||||||
"browser_download_url": "https://github.com/hotwa/luci-app-openclaw/releases/download/node-bins/node-v23.2.0-linux-arm64-musl.tar.xz"
|
"browser_download_url": "https://github.com/hotwa/luci-app-openclaw/releases/download/node-bins/node-v24.14.1-linux-arm64-musl.tar.xz"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "node-v22.16.0-linux-x64-musl.tar.xz",
|
"name": "node-v22.16.0-linux-x64-musl.tar.xz",
|
||||||
@@ -82,25 +82,25 @@ cat > "$tmpdir/node-bins-release.json" <<'EOF'
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
selected_url=$(oc_select_node_release_asset_url "$tmpdir/node-bins-release.json" "linux-arm64" "23.2.0") || fail "select compatible ARM64 musl asset"
|
selected_url=$(oc_select_node_release_asset_url "$tmpdir/node-bins-release.json" "linux-arm64" "24.14.1") || fail "select compatible ARM64 musl asset"
|
||||||
[ "$selected_url" = "https://github.com/hotwa/luci-app-openclaw/releases/download/node-bins/node-v23.2.0-linux-arm64-musl.tar.xz" ] || fail "selected asset should be newest compatible ARM64 musl release"
|
[ "$selected_url" = "https://github.com/hotwa/luci-app-openclaw/releases/download/node-bins/node-v24.14.1-linux-arm64-musl.tar.xz" ] || fail "selected asset should be newest compatible ARM64 musl release"
|
||||||
|
|
||||||
cat > "$tmpdir/gitea-node-bins-release.json" <<'EOF'
|
cat > "$tmpdir/gitea-node-bins-release.json" <<'EOF'
|
||||||
{
|
{
|
||||||
"tag_name": "node-bins",
|
"tag_name": "node-bins",
|
||||||
"assets": [
|
"assets": [
|
||||||
{
|
{
|
||||||
"name": "node-v23.2.0-linux-arm64-musl.tar.xz",
|
"name": "node-v24.14.1-linux-arm64-musl.tar.xz",
|
||||||
"browser_download_url": "http://100.64.0.27:8418/lingyuzeng/luci-app-openclaw/releases/download/node-bins/node-v23.2.0-linux-arm64-musl.tar.xz"
|
"browser_download_url": "http://100.64.0.27:8418/lingyuzeng/luci-app-openclaw/releases/download/node-bins/node-v24.14.1-linux-arm64-musl.tar.xz"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
gitea_selected_url=$(oc_select_node_release_asset_url "$tmpdir/gitea-node-bins-release.json" "linux-arm64" "23.2.0") || fail "select compatible ARM64 musl asset from Gitea release JSON"
|
gitea_selected_url=$(oc_select_node_release_asset_url "$tmpdir/gitea-node-bins-release.json" "linux-arm64" "24.14.1") || fail "select compatible ARM64 musl asset from Gitea release JSON"
|
||||||
[ "$gitea_selected_url" = "http://100.64.0.27:8418/lingyuzeng/luci-app-openclaw/releases/download/node-bins/node-v23.2.0-linux-arm64-musl.tar.xz" ] || fail "selected Gitea asset should preserve browser_download_url"
|
[ "$gitea_selected_url" = "http://100.64.0.27:8418/lingyuzeng/luci-app-openclaw/releases/download/node-bins/node-v24.14.1-linux-arm64-musl.tar.xz" ] || fail "selected Gitea asset should preserve browser_download_url"
|
||||||
|
|
||||||
if oc_select_node_release_asset_url "$tmpdir/node-bins-release.json" "linux-arm64" "24.0.0" >/dev/null 2>&1; then
|
if oc_select_node_release_asset_url "$tmpdir/node-bins-release.json" "linux-arm64" "24.14.2" >/dev/null 2>&1; then
|
||||||
fail "asset selection should fail when no compatible version exists"
|
fail "asset selection should fail when no compatible version exists"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user