修复 CI:ldd 纯静态校验被 pipefail 误杀
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user