You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d7ce789
Browse filesBrowse the repository at this point in the historyBrowse files
PR iteration was bounded by single-job suite runs (~40-50 min critical
path) and by every first-of-ref build starting cold. Same suites, same
sanitizers, same gates — the schedule, the cache reuse, and a new
runtime coverage proof change.
- run-tests-parallel.sh accepts CBM_TEST_SHARD="i/N" and runs a
deterministic slice of --list-suites; unset selects everything, so the
path is inert outside CI. Known-heavy suites are dealt to shards in
weight order first (naive modulo stacked the two slowest, store_arch
and daemon_runtime, onto one job), the parallel wave and the serial
tail are sliced separately so every shard keeps its own quiet tail,
and the per-shard union guard proves each job ran exactly its slice.
- shard-completeness job: per-shard guards cannot see a mis-plumbed
CBM_TEST_SHARD (two jobs running the same slice passes every local
check while a slice runs nowhere). Every leg now uploads a manifest
(leg, i/N, sha of the full suite list, its slice) and one aggregation
job re-proves per leg that the shards agreed on the list, indices are
exactly 1..N, and the union of slices IS the list. Runs on unsharded
topologies too, where each leg's single manifest must cover the list.
- workflow topology (shard_suites input, off by default = byte-identical
to the pre-shard matrix): ubuntu legs run 3 shards, Windows 2 (every
extra Windows shard re-pays ~5 min of MSYS2 setup), macOS stays at 1
(not the critical path; mac runner concurrency ceilings are the
tightest). The Windows test job also pre-creates build\c with a
protected DACL so build products inherit it — workspace drive roots
grant Authenticated Users Modify by inheritance, which the activation
transaction's source-directory policy correctly refuses.
- ccache: a final ref-less restore key lets a fresh PR start from the
newest cache GitHub's scoping permits, and a nightly build-only
cache-warm workflow keeps main-scoped caches at most a day stale —
without it the fallback had no warm source, since nothing built in
main's scope. The strictly-per-ref policy this replaces cost ~8-12
minutes on every first-of-ref build for no safety gain:
CCACHE_COMPILERCHECK=content makes a stale or foreign cache able to
miss but never to return wrong output. Sharded legs restore-all/
save-one (every shard builds the identical objects, so shard 1's
cache carries the full set) — save volume stays flat and warm caches
stop being evicted by per-shard duplicates.
- suite timeouts: daemon_runtime joins the slow tier. It measures ~610s
solo on arm64 under ASan (10-round loop, no hang), so the 900s default
under a loaded 4-job CI runner was a slowness kill masquerading as a
hang detector.
Validated locally: 3-shard union over the real suite list is complete
with no duplicates, one top-heavy suite per shard, and the summed
3-shard totals reproduce the unsharded run exactly (6776 passed,
0 failed, 4 skipped).
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Copy file name to clipboardExpand all lines: .github/workflows/_test.yml
+154-6Lines changed: 154 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ on:
12
12
description: 'Test the broad platform matrix (older glibc + extra OS versions) instead of the core set'
13
13
type: boolean
14
14
default: false
15
+
shard_suites:
16
+
description: 'Split each C-suite leg across parallel shard jobs (ubuntu x3, windows x2); off = one job per leg, byte-identical to the pre-shard topology'
17
+
type: boolean
18
+
default: false
15
19
16
20
permissions:
17
21
contents: read
@@ -31,6 +35,7 @@ jobs:
31
35
id: set
32
36
env:
33
37
BROAD: ${{ inputs.broad_platforms }}
38
+
SHARDS: ${{ inputs.shard_suites }}
34
39
run: |
35
40
CORE_UNIX='[
36
41
{"os":"ubuntu-latest","cc":"gcc","cxx":"g++"},
@@ -63,6 +68,25 @@ jobs:
63
68
UNIX=$(jq -cn --argjson a "$CORE_UNIX" '$a')
64
69
WIN=$(jq -cn --argjson a "$CORE_WIN" '$a')
65
70
fi
71
+
# Suite sharding (opt-in via the shard_suites input): each platform's
72
+
# C-suite run is split across N runner jobs. CBM_TEST_SHARD="i/N"
73
+
# slices deterministically inside run-tests-parallel.sh; each
74
+
# shard's union guard proves it ran exactly its slice; shards are
75
+
# minted HERE from one expansion so a missing shard cannot be
76
+
# configured silently; and the shard-completeness job re-proves the
77
+
# cross-shard union at runtime. Ubuntu runners are plentiful (3
78
+
# shards); Windows gets 2 (every extra shard re-pays ~5 min of
79
+
# MSYS2 setup); macOS stays at 1 — mac legs are not the critical
80
+
# path and mac runner concurrency ceilings are the tightest.
81
+
if [ "$SHARDS" = "true" ]; then
82
+
UNIX=$(jq -c '[.[] | . as $e
83
+
| (if ($e.os | startswith("ubuntu")) then 3 else 1 end) as $n
0 commit comments