Skip to content

Commit 4aae26d

Browse files
CI: Add debug and upload artifacts on failure
1 parent e29915c commit 4aae26d

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,11 +838,57 @@ jobs:
838838
find . -type f -print0 | xargs -0 touch -d yesterday
839839
tar xaf cln-${{ matrix.CFG }}.tar.gz
840840
841+
- name: Debug check-doc-examples inputs
842+
run: |
843+
echo "== lightning-hsmtool =="
844+
which lightning-hsmtool || echo "NOT ON PATH"
845+
find . -name "lightning-hsmtool*" -not -path "./.git/*" 2>/dev/null
846+
847+
echo "== autogenerate-bitcoind-wallet.dat =="
848+
ls -la tests/data/autogenerate-bitcoind-wallet.dat 2>&1
849+
850+
echo "== autogenerate-bitcoin-blocks.json =="
851+
ls -la tests/data/autogenerate-bitcoin-blocks.json 2>&1
852+
echo "-- number of blocks --"
853+
python3 -c "import json; print(len(json.load(open('tests/data/autogenerate-bitcoin-blocks.json'))))" 2>&1
854+
echo "-- first 300 chars --"
855+
head -c 300 tests/data/autogenerate-bitcoin-blocks.json
856+
echo ""
857+
858+
echo "== environment fingerprint =="
859+
# Determinism discriminators: HAVE_USDT toggles tracing, which
860+
# must not perturb the deterministic RNG stream.
861+
grep -E 'HAVE_USDT|HAVE_SQLITE3' config.vars || true
862+
bitcoind --version | head -1 || true
863+
dpkg -l systemtap-sdt-dev 2>/dev/null | tail -1 || true
864+
841865
- name: Test
842866
env:
843867
PYTEST_OPTS: ${{ env.PYTEST_OPTS_BASE }}
844868
run: |
845869
uv run eatmydata make -j $(($(nproc) + 1)) check-doc-examples CARGO=false CC=devtools/cc-nobuild SUPPRESS_GENERATION=1
870+
- name: Save doc diff on failure
871+
if: failure()
872+
run: |
873+
git diff -- doc > doc-examples.patch || true
874+
git status --short -- doc
875+
- name: Collect node logs on failure
876+
if: failure()
877+
run: |
878+
mkdir -p ltests-debug
879+
# pyln-testing leaves /tmp/ltests-* behind on failure: grab every
880+
# node's daemon log and config (skip databases and sockets).
881+
find /tmp/ltests-* -type f \( -name 'log' -o -name '*.log' -o -name 'config' \) \
882+
-exec cp --parents -t ltests-debug {} + 2>/dev/null || true
883+
- name: Upload debug artifacts
884+
if: failure()
885+
uses: actions/upload-artifact@v7
886+
with:
887+
name: doc-examples-debug
888+
path: |
889+
doc-examples.patch
890+
ltests-debug/
891+
if-no-files-found: ignore
846892
- name: Upload test results
847893
if: always()
848894
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)