ci: the pinned-guests check ignores comment lines

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-05 13:01:38 +00:00
parent 4373cd1785
commit 60c4d442ca

View file

@ -29,7 +29,7 @@ fi
ALLOW='^(proving/igneum-prove/pin-guests\.sh|proving/igneum-prove/host/build\.rs|proving/igneum-prove/host/src/bin/pin\.rs|tools/ci/pinned-guests-check\.sh)$'
while IFS= read -r f; do
[[ "$f" =~ $ALLOW ]] && continue
if grep -qE 'IGNEUM_BUILD_GUESTS=1|cargo prove build|-p igneum-prove-(program|aggregator)\b' "$f"; then
if grep -vE '^\s*(//|#)' "$f" | grep -qE 'IGNEUM_BUILD_GUESTS=1|cargo prove build|-p igneum-prove-(program|aggregator)\b'; then # comments do not build
echo "pinned-guests: $f builds a guest outside pin-guests.sh (the host embeds the pinned elf/ files; never build a guest elsewhere)"; fail=1
fi
done < <(git ls-files 'packaging/**' 'proving/**' 'infra/**' 'tools/**' 'relay/playbooks/**' 'app/igneum-app/src/**' '.github/**' | grep -E '\.(sh|ps1|mjs|rs|yml|bat)$')