874d111d60
verify keeps its dependencies and workspace build in a cache saved by main's runs (Swatinem/rust-cache). The new parity job runs on the Mac mini's self-hosted runner (label horizon-game), which holds the maintainer's own Minecraft files: tools/ci/vanilla-data.sh links .local/ to the runner's copy and prepares the resources with the pull request's own horizon-prepare, once per preparer version; then tools/parity.py --changed <base> runs only the harnesses whose traced dependencies changed since the merge base and that have no pass for their current inputs. A fork's pull request runs it only when a maintainer adds run-parity, once per label, on the commit it had then. parity.py: --changed REF, and linux_only in tools/parity_hosts.json for harnesses that differ on other platforms for a reason that is not a Horizon bug (skipped there with the reason, unless named). docs/release-flow.md starts with the pull request checks and merging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62 lines
3.8 KiB
Markdown
62 lines
3.8 KiB
Markdown
# Release flow
|
|
|
|
How a change gets from a pull request to players: the checks a pull request passes, how it merges, and the
|
|
automatic releases that follow. Releases are automatic and frequent so the latest Horizon is always playable;
|
|
there is no separate development channel.
|
|
|
|
## Pull request checks
|
|
|
|
The `checks` workflow (`.github/workflows/ci.yml`) runs two jobs on every pull request:
|
|
|
|
| Job | Runs on | What | Time |
|
|
| --- | --- | --- | --- |
|
|
| `verify` | GitHub `ubuntu-latest` | Public-tree check, Python tests, rustfmt, clippy with warnings denied, Rust tests. Dependencies and the workspace build come from a cache saved by main's runs | ~4 min cold, less warm |
|
|
| `parity` | The Mac mini's runner (`ludovics-mac-mini`, label `horizon-game`) | The vanilla harnesses the change can affect (`tools/parity.py --changed <base>`) | seconds when nothing is affected; minutes per affected harness |
|
|
|
|
Pushes to main run `verify` only; the nightly audit covers main's harnesses.
|
|
|
|
### The parity job
|
|
|
|
Horizon never downloads the game, so harnesses that compare with vanilla run only where the maintainer's own
|
|
copy is: the Mac mini. Its runner runs as the maintainer's account and keeps its checkout between runs
|
|
(`clean: false`), so the probes build incrementally into `.local/parity-target` and earlier passes stand.
|
|
|
|
1. `tools/ci/runner-env.sh` puts the machine's Python 3.13 and the JDK `research-lock.json` pins on the PATH.
|
|
2. `tools/ci/vanilla-data.sh` links `.local/` to the runner's copy of the vanilla data, cloned once from
|
|
`~/code/horizon-parity/shared-local` into `~/.actions-runners/horizon/_work/horizon/shared-local`, and
|
|
prepares `.local/horizon-client` with the pull request's own `horizon-prepare` once per preparer version
|
|
(its sources, the exporters in `mods/horizon/src/test/java` and `research-lock.json`).
|
|
3. `tools/parity.py --changed <base sha>` picks the harnesses whose traced dependencies (their script, Python
|
|
modules, Java oracles and every Rust source their probes compile) changed since the merge base, plus any
|
|
harness nothing is recorded about yet, and runs those that have no pass for their current inputs. A change to
|
|
`Cargo.lock` or `research-lock.json` affects every harness. Each harness has 25 minutes, the job 45.
|
|
|
|
Failed harnesses' logs are uploaded as the `parity-logs` artifact.
|
|
|
|
**Platform-specific harnesses.** A harness listed under `linux_only` in `tools/parity_hosts.json` gives
|
|
different results on macOS for a reason that is not a Horizon bug (the reason is printed). `parity.py` skips it on
|
|
other platforms unless it is named on the command line.
|
|
|
|
**Pull requests from forks** never run code on the Mac mini by themselves. A maintainer who has read the change
|
|
adds the `run-parity` label: that runs the job once, on the commit the pull request had then. To run it again
|
|
after new pushes, remove the label and add it again.
|
|
|
|
**One runner.** The Mac mini has one runner for this repository: parity jobs, the macOS release builds and the
|
|
nightly audit queue behind each other.
|
|
|
|
## Merging
|
|
|
|
Pull requests merge with a merge commit. The orchestrator sessions review a pull request, then turn on
|
|
auto-merge (`gh pr merge <n> --auto --merge`): GitHub merges it once the required checks pass. Branch
|
|
protection on main requires `verify`. Branches don't have to be up to date with main: two sessions merge in
|
|
parallel, and main's own `checks` run catches the rare semantic conflict.
|
|
|
|
`parity` becomes required once it has run green on pull requests for a while (a week without a false failure):
|
|
|
|
```sh
|
|
gh api -X POST repos/ludovic111/horizon/branches/main/protection/required_status_checks/contexts -f 'contexts[]=parity'
|
|
```
|
|
|
|
A skipped `parity` (a fork without the label, a run started by a label) counts as passed, so requiring it never
|
|
blocks a fork's pull request; the maintainer decides whether to run it.
|