Skip to content

ci: start the simulation groups once the native archive is built - #588

Merged
MarcusKainth merged 1 commit into
mainfrom
ci/sim-groups-start-early
Sep 25, 2026
Merged

MarcusKainth merged 1 commit into
mainfrom
ci/sim-groups-start-early

Conversation

@MarcusKainth

@MarcusKainth MarcusKainth commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #587 (ci/test-group-coverage); the diff against that branch is this one commit.

What this changes, and why

Every test job needs every build job: both test archives, the ROM and the reference emulator. A simulation group reads only the native crate's archive, so it waits on the slowest of the others for nothing. The simulation groups are the longest jobs, so their start time sets the critical path.

  • The native archive gets its own job, build-native-tests. build-tests builds the other crates' archive.
  • The simulation groups move to their own matrix job, test-sim. It needs only build-native-tests, downloads only the native archive, and skips the ROM and refemu downloads, which no native suite reads.
  • test keeps emulator and native-rest and still needs every build job.
  • ci-passed needs build-native-tests and test-sim, and every job in the file is in its needs.
  • group_coverage.rs reads the groups of every test matrix, so the check that CI runs every group the script defines covers both jobs.

This costs some duplicated YAML: two build jobs and two test jobs with the same steps. If that isn't worth the time, drop this PR and the rest of the stack still stands.

Evidence

Mutation: native-sim-f dropped from test-sim's matrix, restored with git checkout HEAD -- .github/workflows/ci.yml:

group_coverage exit=101
assertion `left == right` failed: ci.yml's test matrices and the script's groups line name different groups
  left: ["emulator", "native-rest", "native-sim-a", "native-sim-b", "native-sim-c", "native-sim-d", "native-sim-e"]
 right: ["emulator", "native-rest", "native-sim-a", "native-sim-b", "native-sim-c", "native-sim-d", "native-sim-e", "native-sim-f"]
$ make actionlint zizmor shellcheck; echo "exit=$?"
exit=0
$ cargo test --locked -p clickdoom-native --test group_coverage
test result: ok. 2 passed; 0 failed

Job start times

This PR's run 36125404729 overlapped four other runs of this stack, so the account's concurrent-job limit queued its test jobs. build-native-tests finished at 10:46:13 and the first simulation group started at 10:46:17. The other groups waited in the queue until 10:47:54. Every group passed and ci-passed succeeded.

The throwaway run 36126756550 (#590: this branch merged with #585, run on its own) shows the layout without the queue. Attempt 2 had a warm cache:

attempt 2, from the first job's start (11:09:54)
build-native-tests done (32 s archive, 119,335,242 B) +53 s
simulation groups start +56 s
build-tests done (74 s archive, 72,444,455 B) +94 s
emulator, native-rest, test-groups start +98 s
last simulation group (native-sim-f) done +5 min 33 s
native-rest done +8 min 12 s
ci-passed done +8 min 18 s

The simulation groups start 42 s earlier than they could when they need build-tests. The median test job spends 22 s from its start to its suites, and each download takes 3 to 5 s. native-rest is the critical path, running its suites for 371 s at --test-threads 2.

Invariants

None. CI job layout only.

Spec impact

  • None. No contract in SPEC.md is touched

Checks

Written mostly by Claude Opus 5.5.

@github-actions github-actions Bot added area: ci Workflows, the Makefile, and the scripts they run area: native Native mode: the tic simulation and renderer as SQL, and the WAD loader labels Sep 25, 2026
@MarcusKainth
MarcusKainth changed the base branch from ci/test-group-coverage to main September 25, 2026 11:31
Every test job needed every build job: both test archives, the ROM and
the reference emulator. A simulation group reads only the native crate's
archive, so it waited on the slowest of the others for nothing.

The native archive gets its own job, build-native-tests, and build-tests
builds the other crates' archive. The simulation groups move to their own
matrix job, test-sim, which needs only build-native-tests and downloads
only its archive. `test` keeps emulator and native-rest and every build
job. ci-passed needs the two new jobs.

group_coverage.rs reads the groups of every test matrix in ci.yml, so the
check that CI runs every group the script defines covers both jobs.
@MarcusKainth
MarcusKainth force-pushed the ci/sim-groups-start-early branch from 5906254 to 993a4aa Compare September 25, 2026 11:54
@MarcusKainth
MarcusKainth marked this pull request as ready for review September 25, 2026 12:03
@MarcusKainth
MarcusKainth merged commit 3159d52 into main Sep 25, 2026
22 checks passed
@MarcusKainth
MarcusKainth deleted the ci/sim-groups-start-early branch September 25, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci Workflows, the Makefile, and the scripts they run area: native Native mode: the tic simulation and renderer as SQL, and the WAD loader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant