CI Setup
The GitHub Actions workflow at .github/workflows/match.yml in the code repo runs on every pull
request to main and every push to main. It has two jobs.
Readability standard (no ROM needed)
python3 tools/lint_readability.py: every routine outsidetools/readability_baseline.txtmust meet the readability standard (the header checks that need the ROM are skipped here and run in the second job).python3 tools/validate_functions.py: the review log insymbols/reviews/is well formed.python3 tools/progress.py --check: the generated files (symbols/functions.csv,symbols/progress.json) are not tracked, and no doc carries a generated number.
Reassemble and diff (needs the ROM)
- Fetch the ROM from the private
ct-romrepository with theROM_TOKENsecret (see below). - Build asar 1.91 from source and run
python3 tools/check_env.py. make diff: the reassembled ROM must equal the original, byte for byte.python3 tools/verify.py: every byte the source claims is really emitted by it.python3 tools/progress.py --update: regeneratesymbols/from the source.python3 tools/lint_readability.pyagain, now with the ROM (header and caller checks).python3 tools/validate_functions.pyandpython3 tools/progress.py --checkagain.
First-time setup
The ROM cannot be committed to the public repo, and it cannot go in a secret either: GitHub caps
secrets at 48 KB and the ROM is 4 MB. So it lives in a private repository,
ThisIsAkill/ct-rom, as Chrono Trigger (USA).sfc at the root, and CI downloads it with a
read-only token.
1. Create the token
- GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token
- Repository access: Only select repositories →
ct-rom - Permissions → Repository permissions → Contents: Read-only (nothing else)
- Pick an expiry, generate, and copy the token.
2. Add it as a secret on the code repo
- In
ChronoRET: Settings → Secrets and variables → Actions → New repository secret - Name:
ROM_TOKEN - Value: the token
The job downloads the ROM to roms/chrono_trigger.sfc and checks it against rom.sha256 in the
code repo, failing on a mismatch. The expected hash is also on Target ROM. When the
token expires, the download fails with an error naming ROM_TOKEN; make a new one and replace the
secret.
3. Verify
Re-run the latest Byte-exact match check run, or open a pull request; the Reassemble and diff job should now run every step instead of skipping.
If the secret is not set
The second job degrades gracefully: it emits a warning and skips everything after fetching the ROM, so it won't fail. Pull requests from forks never get secrets, so they always skip it. The first job always runs. Contributors without the secret can still run everything locally.