[ci] Split the Linux tests across the suite jobs - #314
Draft
forfudan wants to merge 3 commits into
Draft
Conversation
forfudan
force-pushed
the
ci-linux-matrix
branch
from
August 30, 2026 20:50
8792a45 to
54bd13b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test on Linuxtook 20 minutes where every macOS suite job took under one, and 1173 of its 1231 seconds were spent compiling test files.Three things were true of that job and of no other. It had no Mojo compilation cache: the cache lives in
.github/actions/setup-decimo, next to the artifact download that only macOS could use, so the Linux job could not use the action at all. It ran all eight core suites in sequence. Andtests/test.shforcesDECIMO_TEST_JOBS=1under CI on the grounds that each suite is already its own job there — which was true everywhere except here.The suites
tests/test.sh decimocovers now run as a matrix on their own jobs,[macos-latest, ubuntu-22.04], and the standalone Linux job is gone. Coverage is unchanged: the same eight suites plus the Python bindings, which the old job also built and ran.build-linuxcompiles the package once and uploads it, the waybuilddoes for macOS, and the artifact name carries the platform. Letting each Linux job build its own looked equivalent — it costs eleven seconds — and was not: the Mojo compilation cache keys on the package a test file imports, two independently built.mojocfiles are not reliably identical, and every Linux test compiled cold at 11 s a file against 1 s on macOS.prune_caches.yamldeletes every cache entry but the newest under each key prefix, after each test run. Only the newest is ever restored, since that is whatrestore-keysmatches, so the rest accumulate: the repository had reached 9.95 GB of its 10 GB limit across 177 entries, of which 155 were dead. Past the limit the eviction is LRU and indiscriminate, and an entry a job had just written could be gone before the next run read it — which is why the compilation cache was unreliable on both platforms. Note this only starts working once it is on the default branch;workflow_rundoes not fire for a workflow that lives only on a branch.Measured on the same commit, second run, per test file: BigDecimal on Linux 11.4 s a file before, 1.6 s after; the job itself 451 s to 66 s, against 51 s for the same suite on macOS.