Skip to content

ci: parallel suite shards, main-only criterion benches, dedup gates - #93

Merged
diegokingston merged 1 commit into
mainfrom
perf/ci-parallel-jobs
Jul 30, 2026
Merged

ci: parallel suite shards, main-only criterion benches, dedup gates#93
diegokingston merged 1 commit into
mainfrom
perf/ci-parallel-jobs

Conversation

@diegokingston

Copy link
Copy Markdown
Collaborator

Medido sobre una corrida reciente de main: el job test tardaba 39 min de wall-clock (lint 1 min, web 3.5 min). Este PR lo baja a ~16 min.

Cambios

  1. Criterion benchmarks → job main-only (15.2 min). Eran continue-on-error/informativos pero bloqueaban el wall-clock de cada PR. Ahora corren en un job bench solo en pushes a main — la cadencia de artifacts no cambia.
  2. Dedup de gates: los tests de los gates con nombre corrían dos veces (en su gate y dentro de "Run all tests"). El filtro de la suite ahora excluye los tests de cada gate. Verificado con cargo nextest list: suite 6695 + gates 125 = 6820 = filtro combinado anterior — cada test corre exactamente una vez.
  3. Shard ×2 de la suite (cargo nextest run --partition count:N/2) en jobs paralelos; rust-cache hace que la recompilación por shard sea mayormente hits.
  4. Fix menor: paso duplicado "Install mold linker" en lint y test.

Resultado esperado

Wall-clock de PR: ~39 min → ~16 min (gates ~9 min + shards ~7 min en paralelo). Costo: más runner-minutos totales (compilación duplicada por shard).

Nota

Los nombres de checks cambian: hay que marcar suite (1) y suite (2) como required en branch protection; test, lint y web no cambian. El job bench se saltea en PRs (skipped = success para required checks).

Measured on a recent main run (job test = 39 min wall-clock):

- Criterion benchmarks (15.2 min) were continue-on-error/informational but
  blocked every PR's wall-clock. Moved to a main-only bench job — artifact
  cadence unchanged (every main push), PRs no longer wait for them.
- The named gate steps' tests ran twice: in their gate and again inside
  'Run all tests' (the filter only excluded the perf binaries). The suite
  filter now excludes every gate's tests; verified with cargo nextest list:
  suite 6695 + gates 125 = 6820 = old combined filter, each test runs once.
- The remaining ~6700-test suite is sharded 2-way via nextest --partition
  (rust-cache makes the per-shard recompile mostly cache hits).
- Removed the duplicated 'Install mold linker' step in lint and test.

Expected PR wall-clock: ~39 min → ~16 min (gates ~9 min, shards ~7 min
in parallel). Trade-off: more total runner-minutes (per-shard compile).

Note: check names change — new required checks should be 'suite (1)' and
'suite (2)'; 'test', 'lint', 'web' are unchanged.
@diegokingston
diegokingston merged commit 796215c into main Jul 30, 2026
6 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.

1 participant