ci: check_bios_stamps defaults to the stamps present, not a fixed retail list

The default demanded SCPH1001.emitter.sha, which is gitignored (retail output
is generated from a dump, never committed), so every game's release CI failed
with 'SCPH1001.emitter.sha missing' on a clean checkout. Default to every
generated/*.emitter.sha; naming a stem still requires it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Alex Vanderveen
2026-10-11 16:22:08 -04:00
parent c47f7391e8
commit 2a4824fcb8
+13 -2
View File
@@ -5,12 +5,23 @@
# performs the same comparison at configure (PSXRECOMP_BIOS_STALE_FATAL in
# CI); this runs first so the failure is readable.
#
# Usage: check_bios_stamps.sh [--framework psxrecomp] [stem...] (default: OpenBIOS SCPH1001)
# Usage: check_bios_stamps.sh [--framework psxrecomp] [stem...]
# Default: every stem that has a generated/<stem>.emitter.sha. Retail backends
# (SCPH1001, ...) are gitignored -- generated from a dump, never committed -- so
# a CI checkout carries only the OpenBIOS stamp and must not demand the others.
# Name a stem explicitly to require it.
set -euo pipefail
FRAMEWORK="psxrecomp"
if [[ "${1:-}" == "--framework" ]]; then FRAMEWORK="${2:?}"; shift 2; fi
STEMS=("$@"); [[ ${#STEMS[@]} -gt 0 ]] || STEMS=(OpenBIOS SCPH1001)
FRAMEWORK="$(cd "${FRAMEWORK}" && pwd)"
STEMS=("$@")
if [[ ${#STEMS[@]} -eq 0 ]]; then
for f in "${FRAMEWORK}"/generated/*.emitter.sha; do
[[ -f "${f}" ]] || continue
b="$(basename "${f}")"; STEMS+=("${b%.emitter.sha}")
done
[[ ${#STEMS[@]} -gt 0 ]] || { echo "error: no generated/*.emitter.sha in ${FRAMEWORK}" >&2; exit 1; }
fi
rc=0
for stem in "${STEMS[@]}"; do
stamp_file="${FRAMEWORK}/generated/${stem}.emitter.sha"