Skip to content

Commit 36c8db2

Browse files
killaguclaude
andcommitted
perf(ci): fine-shard ubuntu only; run whole suite on macos/windows
macOS GitHub runners have ~5 concurrent slots, so fanning 22 shards × 2 nodes across macos/windows queued ~9 batches and pushed total wall to ~18min even though each job was ≤60s — the queue depth, not per-job time, was the wall. The ≤60s target is ubuntu-only (high runner concurrency). Restructure the test matrix: - ubuntu-latest: the 22 fine shards × node 22/24 (44 jobs) — all run in parallel, each ≤60s. - macos-latest / windows-latest: whole suite as one job per node (shard=all, 4 jobs) for compatibility coverage without flooding the scarce queue. This matches the pre-optimization per-OS job shape; flakes absorbed by --retry. Drops test jobs from 132 → 48. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 957eb68 commit 36c8db2

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ jobs:
7373
strategy:
7474
fail-fast: false
7575
matrix:
76-
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
76+
# ubuntu-latest runs the fine-grained shards: fork-heavy packages are
77+
# split into vitest --shard slices and the light remainder into
78+
# weight-balanced rest-* shards (see scripts/run-shard.js). Sized so each
79+
# shard's `vitest run` step stays ≤ ~60s on ubuntu-latest, where runner
80+
# concurrency is high enough to run them all in parallel.
81+
os: ['ubuntu-latest']
7782
node: ['22', '24']
78-
# Fork-heavy packages are split into multiple vitest --shard slices and
79-
# the light remainder into rest-* shards (see scripts/run-shard.js).
80-
# Sized so each shard's `vitest run` step stays ≤ ~60s on ubuntu-latest;
81-
# slower macos/windows runners may exceed that but still parallelize.
8283
shard:
8384
- cluster-1
8485
- cluster-2
@@ -102,6 +103,23 @@ jobs:
102103
- rest-4
103104
- rest-5
104105
- rest-6
106+
include:
107+
# macOS/Windows runners have very low concurrency (~5 macOS slots), so
108+
# fanning out 22 shards × 2 nodes would queue ~9 batches and blow up
109+
# wall time. Run the whole suite as a single job per (os, node) instead
110+
# — coverage without flooding the queue. (shard=all => no filter.)
111+
- os: macos-latest
112+
node: '22'
113+
shard: all
114+
- os: macos-latest
115+
node: '24'
116+
shard: all
117+
- os: windows-latest
118+
node: '22'
119+
shard: all
120+
- os: windows-latest
121+
node: '24'
122+
shard: all
105123

106124
name: Test (${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shard }})
107125
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)