From d8be5ee2d22066d13bbbb5b07f546d55c524c05f Mon Sep 17 00:00:00 2001 From: Pascal Garber Date: Tue, 3 Nov 2026 11:10:30 +0100 Subject: [PATCH] ci: report the manifest without failing on it --- docs/ci-build.md | 5 ++++- scripts/compare-sysroot | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/ci-build.md b/docs/ci-build.md index c1c7e6c..57cf43e 100644 --- a/docs/ci-build.md +++ b/docs/ci-build.md @@ -163,7 +163,10 @@ arm64-v8a gives the same three lines for `arm64-v8a.json` instead. All 21 typeli `scripts/compare-sysroot ` is that check; it exits non-zero on any differing content, and the workflow step runs under `bash` with `pipefail`, so a differing -file turns the job red (after the artifact is uploaded). +file turns the job red (after the artifact is uploaded). The manifest is the exception: it +carries the tag, so a new release always differs from the one it rebuilds. It is reported +by the keys that changed and does not fail the job, which keeps red meaning a real +difference in a library, header or typelib. ## What is left diff --git a/scripts/compare-sysroot b/scripts/compare-sysroot index 469475c..a32be37 100755 --- a/scripts/compare-sysroot +++ b/scripts/compare-sysroot @@ -10,7 +10,9 @@ # # Exits non-zero when a path present in BOTH archives differs. A path only one # archive has is reported but not fatal: the release may predate a fix, and -# `find -type f` skips the dangling symlinks older releases carry. +# `find -type f` skips the dangling symlinks older releases carry. The manifest +# (share/android-sysroot/.json) is reported by key and not fatal either: it +# carries the tag, so every new release differs from the one it rebuilds. set -euo pipefail export LC_ALL=C # comm and sort have to agree on byte order @@ -39,7 +41,8 @@ comm -13 "$work/reference.names" "$work/built.names" > "$work/only-built" comm -23 "$work/reference.names" "$work/built.names" > "$work/only-reference" comm -12 "$work/reference.list" "$work/built.list" | cut -f1 > "$work/same" comm -12 "$work/reference.names" "$work/built.names" > "$work/common" -comm -13 "$work/same" "$work/common" > "$work/differing" +comm -13 "$work/same" "$work/common" | grep -v '^share/android-sysroot/[^/]*\.json$' > "$work/differing" || true +comm -13 "$work/same" "$work/common" | grep '^share/android-sysroot/[^/]*\.json$' > "$work/manifest" || true report() { local label=$1 file=$2 count @@ -54,6 +57,14 @@ report "only in the build" "$work/only-built" report "only in the reference" "$work/only-reference" report "differing content" "$work/differing" +while read -r path; do + echo "manifest $path differs in: $(node -e ' + const [a, b] = process.argv.slice(1).map((f) => JSON.parse(require("fs").readFileSync(f, "utf8"))); + const keys = [...new Set([...Object.keys(a), ...Object.keys(b)])].sort(); + console.log(keys.filter((k) => JSON.stringify(a[k]) !== JSON.stringify(b[k])).join(" ")); + ' "$work/reference/$path" "$work/built/$path")" +done < "$work/manifest" + while read -r path; do case $path in *.typelib) ;;