fix: CI restores large files before DB regen, fix coverage numbers

build.yml now downloads large-files release assets and copies them
to their bios/ paths (matched via .gitignore) before regenerating
the database. This fixes Batocera showing 675/680 instead of 679/680
on the remote (PS3UPDAT.PUP, dsi_nand.bin, PSVUPDAT.PUP were missing).

Local: Batocera 679/680, all others 100%.
This commit is contained in:
Abdessamad Derraz
2026-03-18 05:46:16 +01:00
parent 4faae161b4
commit 97a25b17ff
3 changed files with 305 additions and 172 deletions

View File

@@ -30,9 +30,28 @@ jobs:
- run: pip install pyyaml
- name: Restore large files from release
run: |
mkdir -p .cache/large
gh release download large-files -D .cache/large/ 2>/dev/null || true
# Copy large files to their bios/ paths so generate_db sees them
for f in .cache/large/*; do
[ -f "$f" ] || continue
name=$(basename "$f")
# Match against .gitignore entries to find target path
target=$(grep "$name" .gitignore | head -1)
if [ -n "$target" ] && [ ! -f "$target" ]; then
mkdir -p "$(dirname "$target")"
cp "$f" "$target"
echo "Restored: $target"
fi
done
env:
GH_TOKEN: ${{ github.token }}
- name: Regenerate database and docs
run: |
python scripts/generate_db.py --bios-dir bios --output database.json
python scripts/generate_db.py --force --bios-dir bios --output database.json
python scripts/generate_readme.py --db database.json --platforms-dir platforms
- name: Commit if changed