From d7de2df53b4dd2b924d3ec81398c45e5122942e8 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Sun, 1 Nov 2026 02:11:09 +0800 Subject: [PATCH] ci: install FreeBSD LZ4 and expose safe native test diagnostics --- .github/workflows/build.yaml | 2 ++ .github/workflows/check-nsh.yaml | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0f7aaf1..c171fbe 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1017,6 +1017,7 @@ jobs: gmake \ pkgconf \ libxml2 \ + liblz4 \ gnutls \ p11-kit \ nettle \ @@ -1025,6 +1026,7 @@ jobs: libayatana-appindicator \ polkit \ webkit2-gtk_41 + pkgconf --exists libxml-2.0 liblz4 gnutls p11-kit-1 hogweed nettle gmp run: | set -eu ( diff --git a/.github/workflows/check-nsh.yaml b/.github/workflows/check-nsh.yaml index 7bf7823..8ded5ba 100644 --- a/.github/workflows/check-nsh.yaml +++ b/.github/workflows/check-nsh.yaml @@ -107,30 +107,33 @@ jobs: - name: Check demo-free NSH production timeout-minutes: 30 run: | - trap 'code=$?; if [ "$code" -ne 0 ]; then echo "::error::NSH production check failed; diagnostics suppressed."; fi' EXIT + diagnostics="$(mktemp)" + trap 'code=$?; if [ "$code" -ne 0 ]; then echo "::error::NSH production check failed; diagnostics suppressed."; python3 .ci/scripts/private-ci-diagnostics.py compile "$diagnostics" || true; fi; rm -f "$diagnostics"' EXIT ( set -euo pipefail cd source/gpgui cargo +1.97.0 check --manifest-path apps/desktop-nsh/Cargo.toml --locked --bin gpgui-nsh - ) >/dev/null 2>&1 + ) >"$diagnostics" 2>&1 echo "NSH production check passed." - name: Compile NSH tests timeout-minutes: 30 run: | - trap 'code=$?; if [ "$code" -ne 0 ]; then echo "::error::NSH test compilation failed; diagnostics suppressed."; fi' EXIT + diagnostics="$(mktemp)" + trap 'code=$?; if [ "$code" -ne 0 ]; then echo "::error::NSH test compilation failed; diagnostics suppressed."; python3 .ci/scripts/private-ci-diagnostics.py compile "$diagnostics" || true; fi; rm -f "$diagnostics"' EXIT ( set -euo pipefail cd source/gpgui cargo +1.97.0 test --manifest-path apps/desktop-nsh/Cargo.toml --locked --features demo --no-run - ) >/dev/null 2>&1 + ) >"$diagnostics" 2>&1 echo "NSH test compilation passed." - name: Run NSH tests timeout-minutes: 10 run: | - trap 'code=$?; if [ "$code" -ne 0 ]; then echo "::error::NSH tests failed; diagnostics suppressed."; fi' EXIT + diagnostics="$(mktemp)" + trap 'code=$?; if [ "$code" -ne 0 ]; then echo "::error::NSH tests failed; diagnostics suppressed."; python3 .ci/scripts/private-ci-diagnostics.py tests "$diagnostics" || true; fi; rm -f "$diagnostics"' EXIT ( set -euo pipefail cd source/gpgui cargo +1.97.0 test --manifest-path apps/desktop-nsh/Cargo.toml --locked --features demo -- --test-threads=1 - ) >/dev/null 2>&1 + ) >"$diagnostics" 2>&1 echo "NSH tests passed."