116a7f7dca
Launchers copy a player's prepared resources to a new release while its preparer declares the same OUTPUT_VERSION (the launcher side is its own pull request). The number is bumped by hand; CI keeps it honest: the parity job already prepares with every change to the preparer, and tools/prepare_output.py check now fails when that preparation's digest is not the one crates/horizon-prepare/output-versions.txt gives the current number, or when the file changed other than by appending a version. The digest canonicalises what differs between two runs of the same preparer (JSON key order, creative tab tag order, lambda class addresses, logs, the sounds): 10 preparations by 5 preparer versions on the three Mac runners give one digest, and a Linux preparation by an older preparer gives the Mac runners' digest for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
2.4 KiB
YAML
59 lines
2.4 KiB
YAML
name: parity
|
|
# The vanilla harnesses a pull request's changes can affect, on the Mac mini's runner, which holds the maintainer's
|
|
# own Minecraft files (Horizon never downloads the game). Called by ci.yml for pull requests from this repository
|
|
# and by run-parity.yml when a maintainer labels a fork's pull request run-parity. See docs/release-flow.md.
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
base:
|
|
description: The pull request's base commit (the harnesses its changes since then can affect)
|
|
type: string
|
|
required: true
|
|
head:
|
|
description: The commit to check out and test
|
|
type: string
|
|
required: true
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
# Test runs never reach the telemetry server: no live-count ping, no uploads (docs/telemetry.md).
|
|
HORIZON_TELEMETRY_URL: "off"
|
|
|
|
jobs:
|
|
parity:
|
|
runs-on: [self-hosted, horizon-game]
|
|
timeout-minutes: 120 # a change to core crates reruns ~300 harnesses: ~60-90 min on the Mac mini
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# The commit the event names: a fork's later pushes need another run-parity label.
|
|
ref: ${{ inputs.head }}
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
# Keeps .local/ (parity state, probe builds, oracle results) and target/ between runs.
|
|
clean: false
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Tools from the runner
|
|
run: bash tools/ci/runner-env.sh
|
|
- name: Vanilla data, and resources prepared by this preparer
|
|
run: bash tools/ci/vanilla-data.sh
|
|
- name: The prepared output is the one the preparer's OUTPUT_VERSION says
|
|
env:
|
|
BASE_SHA: ${{ inputs.base }}
|
|
run: python3 tools/prepare_output.py check --cache --base "$BASE_SHA"
|
|
- name: The version constants are the pinned jar's
|
|
run: python3 tools/gen_version_consts.py --check
|
|
- name: The harnesses this change can affect
|
|
env:
|
|
PARITY_HOSTS: ''
|
|
BASE_SHA: ${{ inputs.base }}
|
|
run: python3 tools/parity.py --changed "$BASE_SHA" --timeout 2400 # world_spawn takes ~1480 s on a busy runner
|
|
- name: Logs of the failed harnesses
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: parity-logs
|
|
path: .local/parity-runner/logs/
|
|
if-no-files-found: ignore
|
|
retention-days: 3
|