criu/scripts
Adrian Reber 4d76d1acdc ci: shard alpine-test into parallel jobs to reduce CI time
The alpine-test CI job runs all ~483 zdtm tests sequentially three
times (normal, mntns-compat-mode, criu-config), followed by many
non-shardable tests. This dominates overall CI wait time. With only
2 jobs running in parallel (GCC and CLANG) the alpine tests take
around 30 minutes.

Use the existing --test-shard-index and --test-shard-count flags
already built into test/zdtm.py to split the zdtm test suite across
four parallel runners (shards 0-3). A fifth shard runs all
non-shardable tests (lazy pages, fault injection, test/others/*,
rootless, compel, plugins, etc.) independently and in parallel with
the zdtm shards. This increases parallelism from 2 to 10 jobs and
reduces the alpine test wall-clock time from ~30 to ~10 minutes.

Changes:
- run-ci-tests.sh: Build SHARD_OPTS from ZDTM_SHARD_INDEX/COUNT
  env vars and pass them to zdtm.py. Extract all non-shardable
  tests into a run_non_shardable_tests() function. Dispatch based
  on shard index: 0-3 run zdtm slices, 4 runs non-shardable
  tests, unset runs everything sequentially (preserving existing
  behavior). Validate that ZDTM_SHARD_INDEX is set when
  ZDTM_SHARD_COUNT is set.
- Makefile: Pass ZDTM_SHARD_INDEX and ZDTM_SHARD_COUNT into the
  container when set. Split long container run command across
  multiple lines for readability.
- ci.yml: Add shard: [0, 1, 2, 3, 4] to the alpine-test matrix,
  producing 10 jobs (2 compilers x 5 shards). Job labels now show
  descriptive shard names (e.g. "zdtm 1/4", "non-zdtm") instead
  of raw indices.

When sharding is not configured the script behaves identically to
before, so other CI jobs (aarch64, compat, gcov, etc.) are
unaffected.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Adrian Reber <areber@redhat.com>
2026-05-24 07:19:51 +01:00
..
build ci: remove mips64el-stable-cross and mips64el-unstable-cross 2026-03-13 07:51:33 +00:00
ci ci: shard alpine-test into parallel jobs to reduce CI time 2026-05-24 07:19:51 +01:00
nmk make: default CC to cc instead of gcc 2026-04-24 00:52:06 +00:00
criu-ns criu-ns: fix lint error 2024-09-11 16:02:11 -07:00
fake-restore.sh
feature-tests.mak scripts: rseq: fix detection of rseq_cpu_id_state 2026-03-03 11:49:59 -08:00
fetch-clang-format.sh clang-format: disable column limit constraint 2023-10-22 13:29:25 -07:00
flake8.cfg coredump: remove unused import 2022-04-28 17:53:52 -07:00
github-indent-warnings.py lint: don't fail workflow on indent fail 2023-10-22 13:29:25 -07:00
install-criu-image-streamer.sh
magic-gen.py make: remove checks for python 2 binary 2023-10-22 13:29:25 -07:00
protobuf-gen.sh scripts/protobuf-gen.sh: fix (not ignore) shellcheck warnings 2023-04-15 21:17:21 -07:00
ruff.toml make: replace flake8 with ruff 2024-09-11 16:02:11 -07:00
systemd-autofs-restart.sh Fix some codespell warnings 2022-04-28 17:53:52 -07:00
tmp-files.sh scripts: fix shellcheck warnings 2021-09-03 10:31:00 -07:00
uninstall_module.py scripts/uninstall_module: import signal module 2025-03-21 12:40:31 -07:00