ci: upload only what the run wrote, and a failed upload is a warning (#184)

scripts/nightly.sh run-logs gathers the logs and DoE CSVs newer than
the run's start, and the stages' output, into build/nightly/run-logs/;
acceptance, nightly and release upload that, not every log in the
tree, with continue-on-error (Captain Bob: "A warning only").
scripts/test_nightly_run_logs.sh: 5 of 8 failed first; its own error
(nightly.sh works from the repository root) corrected with
NIGHTLY_TREE; 8 pass. To see: CI's next acceptance uploads a handful.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-20 22:52:21 +00:00
parent 9db364f7c7
commit 20918f9f09
7 changed files with 105 additions and 12 deletions
+18 -1
View File
@@ -19,6 +19,10 @@
# found, and one value (#172 -- it was one distinct value, which two of the three could make).
# scripts/nightly.sh test-32
# make -C v4 test-32: v4 with 32-bit cells, every test (the acceptance's last part).
# scripts/nightly.sh run-logs
# What this run wrote, gathered for CI to upload (#184): the files under logs/ and
# experiments/bare_metal/runs/ newer than the run's start ($OUT/.started), and the stages' own
# output ($OUT/*.txt), copied with their paths into $OUT/run-logs/. Not every log in the tree.
# scripts/nightly.sh capsule-trust
# A signed build with one capsule's signature taken out (v4:centre.4th), booted on amd64: the kernel
# must refuse it and stop (#139; plan 2026-11-20-capsule-trust.md, ruling 4, "Left to CI"). Needs
@@ -94,7 +98,7 @@ DOCS=build/nightly-docs
LITHOS=$(sed -n 's/^LITHOS_VERSION *?= *//p' kernel/Makefile)
VERSION=${NIGHTLY_VERSION:-$LITHOS-SNAPSHOT}
usage() {
echo "Usage: scripts/nightly.sh accept <amd64|aarch64|riscv64|stick-high> | test-32 | capsule-trust | v4-checks | proofs | images" >&2
echo "Usage: scripts/nightly.sh accept <amd64|aarch64|riscv64|stick-high> | test-32 | capsule-trust | run-logs | v4-checks | proofs | images" >&2
echo " | publish <URL> | docs | publish-docs <URL> | gitea-release <tag>" >&2
echo " | protocol [<stage>...] | protocol-report | dict-hash | post-count" >&2
echo " | diagnose [<stage that failed>]" >&2
@@ -196,6 +200,19 @@ dict-hash)
echo "nightly: the three architectures do not agree on dict_hash -- $(tr '\n' ' ' <<<"$distinct")" >&2; exit 1
fi
;;
run-logs)
need "$OUT/.started"
rm -rf "$OUT/run-logs"; mkdir -p "$OUT/run-logs"
out_abs=$(cd "$OUT" && pwd)
(cd "${NIGHTLY_TREE:-.}" && # NIGHTLY_TREE: the tests' scratch tree (scripts/test_nightly_run_logs.sh)
find logs experiments/bare_metal/runs -type f -newer "$out_abs/.started" -print0 2>/dev/null \
| while IFS= read -r -d '' f; do mkdir -p "$out_abs/run-logs/$(dirname "$f")"; cp -p "$f" "$out_abs/run-logs/$f"; done)
for f in "$OUT"/*.txt; do
[ -f "$f" ] || continue
mkdir -p "$OUT/run-logs/$(basename "$OUT")"; cp -p "$f" "$OUT/run-logs/$(basename "$OUT")/"
done
echo "=== nightly: run-logs: $(find "$OUT/run-logs" -type f | wc -l) files, this run's, in $OUT/run-logs"
;;
capsule-trust)
git checkout -q -- disk/zuse-scratch
python3 scripts/qemu_session.py unsigned_capsule amd64 --label nightly-capsule-trust --make "QEMU_DISPLAY=none"