From b98a915df368f109d965ce4bb0551bde9dfbb002 Mon Sep 17 00:00:00 2001 From: Wang Defa <1+wangdefa@noreply.gitea.bcde.io> Date: Wed, 10 Jun 2026 15:06:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20CI=EF=BC=9Aldd=20=E7=BA=AF?= =?UTF-8?q?=E9=9D=99=E6=80=81=E6=A0=A1=E9=AA=8C=E8=A2=AB=20pipefail=20?= =?UTF-8?q?=E8=AF=AF=E6=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/ci.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index c7567b3..0565dd2 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -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