mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 07:33:45 -06:00
refactor: read measurements from the local tree
The site compiles the index and the SQLite files from measurements/ instead of a pinned clone. The pin, the sync script, the CI clone steps, the freshness area and its refresh handler are gone. core_probe --record writes into measurements/ of the checkout by default, and a test fails when a line or data file HEAD holds changed or vanished.
This commit is contained in:
1 parent
7dca6ae052
commit
571e50f2a8
17 files changed
+699
-881
No files matched your search
@@ -57,7 +57,6 @@ on:
|
||||
- "scripts/slots.py"
|
||||
- "scripts/sourceref.py"
|
||||
- "scripts/split_pack.py"
|
||||
- "scripts/sync_measurements.py"
|
||||
- "scripts/truth.py"
|
||||
- "scripts/upstream.py"
|
||||
- "scripts/validate_schemas.py"
|
||||
@@ -72,7 +71,7 @@ on:
|
||||
- "database.json"
|
||||
- "release.json"
|
||||
- "derivable.json"
|
||||
- "measurements-pin.json"
|
||||
- "measurements/**"
|
||||
# The Starlight project: config, components, styles, lockfile. Its
|
||||
# generated folders are gitignored and never trigger anything.
|
||||
- "website/**"
|
||||
@@ -118,18 +117,6 @@ jobs:
|
||||
|
||||
- run: npm ci --prefix website
|
||||
|
||||
# The core probe records live in Abdess/retrobios-measurements, read
|
||||
# at the commit measurements-pin.json names and never at its head: a
|
||||
# record reaches the site when the pin moves. One shallow fetch of that
|
||||
# commit, with git alone.
|
||||
- name: Clone the measurements at their pin
|
||||
run: |
|
||||
repo=$(python -c "import json; print(json.load(open('measurements-pin.json'))['repo'])")
|
||||
commit=$(python -c "import json; print(json.load(open('measurements-pin.json'))['commit'])")
|
||||
git init -q .cache/measurements
|
||||
git -C .cache/measurements fetch -q --depth 1 "$repo" "$commit"
|
||||
git -C .cache/measurements checkout -q --detach "$commit"
|
||||
|
||||
- name: Validate data contracts
|
||||
run: python scripts/validate_schemas.py
|
||||
|
||||
@@ -149,7 +136,7 @@ jobs:
|
||||
|
||||
- name: Generate site
|
||||
run: |
|
||||
python scripts/generate_site.py --require-measurements
|
||||
python scripts/generate_site.py
|
||||
python scripts/generate_readme.py --db database.json --platforms-dir platforms
|
||||
# starlight-links-validator fails the build on a dead link or anchor.
|
||||
npm run build --prefix website
|
||||
|
||||
@@ -29,7 +29,7 @@ on:
|
||||
- "database.json"
|
||||
- "release.json"
|
||||
- "derivable.json"
|
||||
- "measurements-pin.json"
|
||||
- "measurements/**"
|
||||
- "website/**"
|
||||
# Spelled out twice because the workflow parser reads no YAML anchor. A test
|
||||
# holds the two lists equal.
|
||||
@@ -54,7 +54,7 @@ on:
|
||||
- "database.json"
|
||||
- "release.json"
|
||||
- "derivable.json"
|
||||
- "measurements-pin.json"
|
||||
- "measurements/**"
|
||||
- "website/**"
|
||||
|
||||
permissions:
|
||||
@@ -259,21 +259,11 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# The measurement records at their pin, as deploy-site.yml reads them:
|
||||
# the pages and the schema check read the same lines.
|
||||
- name: Clone the measurements at their pin
|
||||
run: |
|
||||
repo=$(python -c "import json; print(json.load(open('measurements-pin.json'))['repo'])")
|
||||
commit=$(python -c "import json; print(json.load(open('measurements-pin.json'))['commit'])")
|
||||
git init -q .cache/measurements
|
||||
git -C .cache/measurements fetch -q --depth 1 "$repo" "$commit"
|
||||
git -C .cache/measurements checkout -q --detach "$commit"
|
||||
|
||||
# The pages are gitignored, and the tests that read them fail
|
||||
# in CI without it. The suite runs whatever this step returned, so a
|
||||
# generator that stops still leaves every other test reporting.
|
||||
- name: Generate the site
|
||||
run: python scripts/generate_site.py --require-measurements
|
||||
run: python scripts/generate_site.py
|
||||
|
||||
- name: Run test suite
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
Reference in new issue
Block a user