Skip to content

ci: run the invariant checks once instead of per matrix leg - #42

Merged
ch-ahindura merged 4 commits into
sopherapps:mainfrom
ch-ahindura:hotfix/slow-ci-tests
Aug 7, 2026
Merged

ci: run the invariant checks once instead of per matrix leg#42
ch-ahindura merged 4 commits into
sopherapps:mainfrom
ch-ahindura:hotfix/slow-ci-tests

Conversation

@Tinitto

@Tinitto Tinitto commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

The server-and-driver matrix has five legs — mock, aer, quantify, qblox, sim — and every one of them ran the same go vet, the same ruff, and the same CLI suite. Four redundant copies of each. lint-go depends on build-dashboard, so each leg also built the dashboard twice: once as an explicit step and once as that prerequisite. Ten dashboard builds a run, of which five did nothing.

Those three checks move to a lint-and-test-shared job that runs once. The matrix keeps only what actually varies by extra: the dependency set, the extra's own Python tests, and its driver end-to-end run.

The dashboard build stays on the legs that run a driver end to end, because build_server is a bare go build and main.go embeds the dist — but not on sim, which runs no driver.

Both publish gates gain the new job, so a lint failure still blocks a release.

Also wires in make test-dashboard. The target has existed since the graph work but CI invokes targets individually rather than through make test, so the dashboard's unit tests have never run there. It goes ahead of the Cypress step: a broken helper should fail in seconds, not as a puzzling assertion against a live server four minutes later.

Not addressed here: the sim leg pays for the whole thirty-three-node DAG walk twice, once per scheduler, at ~90s each. Measured, that is 78% of test_calibration_loop.py, and it is evenly spread across the routines — the slowest is ramsey at 3.7s — so there is nothing to trim without weakening the tier-3 fits. Splitting the two schedulers into their own legs would halve that wall clock, and is worth measuring once this lands.

The server-and-driver matrix has five legs — mock, aer, quantify, qblox, sim —
and every one of them ran the same `go vet`, the same `ruff`, and the same CLI
suite. Four redundant copies of each. `lint-go` depends on `build-dashboard`,
so each leg also built the dashboard twice: once as an explicit step and once
as that prerequisite. Ten dashboard builds a run, of which five did nothing.

Those three checks move to a `lint-and-test-shared` job that runs once. The
matrix keeps only what actually varies by extra: the dependency set, the
extra's own Python tests, and its driver end-to-end run.

The dashboard build stays on the legs that run a driver end to end, because
`build_server` is a bare `go build` and main.go embeds the dist — but not on
`sim`, which runs no driver.

Both publish gates gain the new job, so a lint failure still blocks a release.

Also wires in `make test-dashboard`. The target has existed since the graph
work but CI invokes targets individually rather than through `make test`, so
the dashboard's unit tests have never run there. It goes ahead of the Cypress
step: a broken helper should fail in seconds, not as a puzzling assertion
against a live server four minutes later.

Not addressed here: the `sim` leg pays for the whole thirty-three-node DAG
walk twice, once per scheduler, at ~90s each. Measured, that is 78% of
test_calibration_loop.py, and it is evenly spread across the routines — the
slowest is `ramsey` at 3.7s — so there is nothing to trim without weakening
the tier-3 fits. Splitting the two schedulers into their own legs would halve
that wall clock, and is worth measuring once this lands.
@ch-ahindura
ch-ahindura force-pushed the hotfix/slow-ci-tests branch from 7cc856f to bf7281a Compare August 7, 2026 15:01
@ch-ahindura
ch-ahindura force-pushed the hotfix/slow-ci-tests branch from 61393ee to b3a0395 Compare August 7, 2026 16:25

@ch-ahindura ch-ahindura left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ch-ahindura
ch-ahindura merged commit 8570e77 into sopherapps:main Aug 7, 2026
22 checks passed
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.

2 participants