With select-tests, the action also outputs the tests to run: those of the
crates that own a changed file, of the crates that declare a read of it
([package.metadata.craft] reads), and of every crate that depends on
them by any dependency kind, as a nextest filterset (filter), a member
list (skip) and all/some/none (tests). The build setup, a crate's own
Cargo.toml and non-documentation files outside the crates run every
test; documentation alone runs none. The same pass fails on an
undeclared or stale cross-crate read. The docs input adds documentation
globs for both selections.
With archive-command and shard-archives: true, the build job sets NEXTEST_ARCHIVE_DIR,
NEXTEST_ARCHIVE_NAME and GATE_SHARDS, archive-command writes one archive per shard, and each is
uploaded as gate-archive-<os>-<k>. Shard k downloads only its own, so it fetches only the test
binaries it runs. One upload step per archive caps shard-archives at 8 shards; the select job
rejects more, and shard-archives without archive-command. Off by default: one archive for every
shard, as before.
With archive-command, a build (<os>) job per runner builds the tests once
into a nextest archive; the shard legs download it and build nothing, and
only they wait for the build job. after-archive-command runs in the build
job after the upload. With cache-workspace-crates, the saving leg writes a
rolling dependency entry that keeps the workspace crates, and every leg
restores the newest one with restore-mtimes. The lint legs move to a lint
job of their own that never waits for the build. Every job's setup is
actions/gate-setup; commands run through actions/gate-run. Every new input
defaults to today's behaviour.
The save-condition guards read the cache-save and writes inputs every job
passes to gate-setup: the build and lint jobs carry the approved condition,
the gate job the same narrowed to its one saving leg per runner.
Result markers are files named after their leg and download with
merge-multiple, so one shard or one build lands where the check reads it.
The archive upload overwrites on a re-run. archive-command without
test-shards is an error.
The first-party actions are pinned to the commit that added gate-setup.
A select legs job (actions/select-platforms) runs the select-os legs on a pull
request only when a changed file is in a crate with platform cfg code or a crate
that depends on one (cargo metadata --no-deps and a scan of the sources), is part
of the build setup or select-paths, or lies outside every crate and is not
documentation. The select-label label (full-ci) and every other event run every
leg. Without select-os no select job runs and the matrix is os, as before.
On craft-libs today 37 of 177 crates have platform cfg code and 57 are affected
with their dependents; 39 of the last 80 merged pull requests would have run the
Linux leg only.