Skip to content

[ci] Split the Linux tests across the suite jobs - #314

Draft
forfudan wants to merge 3 commits into
mainfrom
ci-linux-matrix
Draft

[ci] Split the Linux tests across the suite jobs#314
forfudan wants to merge 3 commits into
mainfrom
ci-linux-matrix

Conversation

@forfudan

@forfudan forfudan commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Test on Linux took 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. And tests/test.sh forces DECIMO_TEST_JOBS=1 under CI on the grounds that each suite is already its own job there — which was true everywhere except here.

The suites tests/test.sh decimo covers 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-linux compiles the package once and uploads it, the way build does 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 .mojoc files are not reliably identical, and every Linux test compiled cold at 11 s a file against 1 s on macOS.

prune_caches.yaml deletes every cache entry but the newest under each key prefix, after each test run. Only the newest is ever restored, since that is what restore-keys matches, 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_run does 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant