修复 CI:ldd 纯静态校验被 pipefail 误杀
Build and Release / build-and-test (arm64) (push) Successful in 20s
Build and Release / build-and-test (amd64) (push) Successful in 21s
Build and Release / release (push) Successful in 4s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 15:06:44 +08:00
co-authored by Claude Opus 4.8
parent 3b024fdc10
commit b98a915df3
+7 -2
View File
@@ -66,8 +66,13 @@ jobs:
# 快速验证:--help 冒烟 + ldd 纯静态校验(musl 静态可在 glibc runner 直接跑)
mkdir -p test && tar -xzf "${TARGZ}" -C test
test/p2pool --help >/dev/null 2>&1 && echo "✅ --help OK" || echo "⚠️ --help 退出非0"
ldd test/p2pool 2>&1 | grep -qE 'statically linked|not a dynamic executable' \
&& echo "✅ fully-static(无动态依赖,跨发行版)" || { echo "⚠️ 非纯静态:"; ldd test/p2pool; }
# ldd 对纯静态二进制返回 exit 1,须先捕获输出再判定(run 块是 bash -e -o pipefail,直接管道会被误杀)
LDD_OUT=$(ldd test/p2pool 2>&1 || true)
if echo "$LDD_OUT" | grep -qE 'statically linked|not a dynamic executable'; then
echo "✅ fully-static(无动态依赖,跨发行版)"
else
echo "⚠️ 非纯静态:"; echo "$LDD_OUT"; exit 1
fi
rm -rf test
- name: Build Debian package