mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-20 17:06:42 +00:00
The gate's build job writes one nextest archive per shard (craft-common-actions gate.yml shard-archives), so each shard downloads only the test binaries it runs instead of the whole 2.4-2.6 GB archive. `cargo xtask ci archive` builds and lists the tests once, then plans the shards (xtask/src/shards.rs): whole binaries go to the lightest shard, heaviest first, by the times in .config/ci-test-times.tsv; a binary heavier than half a shard's share is split by test filter along its module tree, and its executable goes into each archive that runs part of it. On Linux shard 1 takes every binary with gpu-group tests. The build checks that every test runs on exactly one shard, writes the plan into the target directory, which every archive carries, and archives each shard with `cargo nextest archive -E`. A shard runs `xtask ci tests --shard <k>` with its part of the plan; the slice partition is gone. scripts/ci-test-times.py refreshes the times file from a CI run's shard logs; a missing or stale row only costs balance.