mirror of
https://github.com/hotwa/luci-app-openclaw.git
synced 2026-03-30 20:25:44 +00:00
Support relocatable custom install roots
This commit is contained in:
42
.github/workflows/build-node-musl.yml
vendored
42
.github/workflows/build-node-musl.yml
vendored
@@ -62,6 +62,27 @@ jobs:
|
||||
echo "=== Tarball contents (first 20 entries) ==="
|
||||
tar tJf dist/*.tar.xz | head -20
|
||||
|
||||
- name: Verify relocatable tarball
|
||||
run: |
|
||||
docker run --rm --platform linux/arm64 \
|
||||
-v "$PWD/dist:/dist:ro" \
|
||||
alpine:3.21 sh -euxc '
|
||||
apk add --no-cache xz icu-data-full tar
|
||||
TARBALL=$(ls /dist/*.tar.xz | head -1)
|
||||
verify_prefix() {
|
||||
prefix="$1"
|
||||
rm -rf "$prefix"
|
||||
mkdir -p "$prefix"
|
||||
tar -xJf "$TARBALL" --strip-components=1 -C "$prefix"
|
||||
"$prefix/bin/node" --version
|
||||
exec_path=$("$prefix/bin/node" -e "process.stdout.write(process.execPath)")
|
||||
[ "$exec_path" = "$prefix/bin/node" ]
|
||||
NODE_ICU_DATA="$prefix/share/icu" "$prefix/bin/npm" --version >/dev/null
|
||||
}
|
||||
verify_prefix /opt/openclaw/node
|
||||
verify_prefix /tmp/custom-openclaw-root/openclaw/node
|
||||
'
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -115,6 +136,27 @@ jobs:
|
||||
echo "=== Tarball contents (first 20 entries) ==="
|
||||
tar tJf dist/*.tar.xz | head -20
|
||||
|
||||
- name: Verify relocatable tarball
|
||||
run: |
|
||||
docker run --rm --platform linux/arm64 \
|
||||
-v "$PWD/dist:/dist:ro" \
|
||||
alpine:3.21 sh -euxc '
|
||||
apk add --no-cache xz icu-data-full tar
|
||||
TARBALL=$(ls /dist/*.tar.xz | head -1)
|
||||
verify_prefix() {
|
||||
prefix="$1"
|
||||
rm -rf "$prefix"
|
||||
mkdir -p "$prefix"
|
||||
tar -xJf "$TARBALL" --strip-components=1 -C "$prefix"
|
||||
"$prefix/bin/node" --version
|
||||
exec_path=$("$prefix/bin/node" -e "process.stdout.write(process.execPath)")
|
||||
[ "$exec_path" = "$prefix/bin/node" ]
|
||||
NODE_ICU_DATA="$prefix/share/icu" "$prefix/bin/npm" --version >/dev/null
|
||||
}
|
||||
verify_prefix /opt/openclaw/node
|
||||
verify_prefix /tmp/custom-openclaw-root/openclaw/node
|
||||
'
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user