9191 path : |
9292 node_modules
9393 ~/.bun/install/cache
94- key : e2e -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
95- restore-keys : e2e -${{ runner.os }}-bun-
94+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
95+ restore-keys : deps -${{ runner.os }}-bun-
9696
9797 - name : Install Dependencies
9898 run : bun install --frozen-lockfile
@@ -119,10 +119,14 @@ jobs:
119119 retention-days : 7
120120
121121 smoke-strict-core :
122- name : Strict Smoke Tests (Core)
122+ name : Strict Smoke Tests (Core ${{ matrix.shard }}/3 )
123123 if : ${{ github.event_name != 'workflow_dispatch' || inputs.run_smoke_strict }}
124124 runs-on : ubuntu-latest
125- timeout-minutes : 60
125+ timeout-minutes : 20
126+ strategy :
127+ fail-fast : false
128+ matrix :
129+ shard : [0, 1, 2]
126130 services :
127131 postgres :
128132 image : postgres:16
@@ -183,8 +187,8 @@ jobs:
183187 path : |
184188 node_modules
185189 ~/.bun/install/cache
186- key : smoke -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
187- restore-keys : smoke -${{ runner.os }}-bun-
190+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
191+ restore-keys : deps -${{ runner.os }}-bun-
188192
189193 - name : Install Dependencies
190194 run : bun install --frozen-lockfile
@@ -200,32 +204,37 @@ jobs:
200204 run : |
201205 bun run testing/smoke-test.ts \
202206 --preset pr-core \
207+ --partition ${{ matrix.shard }}/3 \
203208 --dev-check \
204209 --strict \
205- --output testing/.smoke-output/core
210+ --output testing/.smoke-output/core-${{ matrix.shard }}
206211
207212 - name : Post Summary
208213 if : always()
209214 run : |
210- if [ -f testing/.smoke-output/core/summary.md ]; then
211- cat testing/.smoke-output/core/summary.md >> "$GITHUB_STEP_SUMMARY"
215+ if [ -f testing/.smoke-output/core-${{ matrix.shard }} /summary.md ]; then
216+ cat testing/.smoke-output/core-${{ matrix.shard }} /summary.md >> "$GITHUB_STEP_SUMMARY"
212217 fi
213218
214219 - name : Upload Results
215220 if : always()
216221 uses : actions/upload-artifact@v4
217222 with :
218- name : smoke-strict-core-results
219- path : testing/.smoke-output/core/
223+ name : smoke-strict-core-results-${{ matrix.shard }}
224+ path : testing/.smoke-output/core-${{ matrix.shard }} /
220225 include-hidden-files : true
221226 if-no-files-found : warn
222227 retention-days : 7
223228
224229 smoke-strict-broad :
225- name : Strict Smoke Tests (Broad)
230+ name : Strict Smoke Tests (Broad ${{ matrix.shard }}/6 )
226231 if : ${{ github.event_name != 'workflow_dispatch' || inputs.run_smoke_strict }}
227232 runs-on : ubuntu-latest
228- timeout-minutes : 60
233+ timeout-minutes : 20
234+ strategy :
235+ fail-fast : false
236+ matrix :
237+ shard : [0, 1, 2, 3, 4, 5]
229238 services :
230239 postgres :
231240 image : postgres:16
@@ -253,10 +262,11 @@ jobs:
253262 --health-timeout 5s
254263 --health-retries 10
255264 steps :
256- # The broad matrix scaffolds and installs many projects across every
257- # ecosystem and has exhausted the runner disk (run 29582988254 died with
258- # "No space left on device"). Drop the big preinstalled toolchains this
259- # job never uses (~25GB: Android SDK, GHC, CodeQL, Swift, boost).
265+ # The broad matrix once exhausted the runner disk when all presets ran
266+ # in one job (run 29582988254 died with "No space left on device"). Each
267+ # shard now runs ~1/6 of the presets and cleans up per project, but the
268+ # big preinstalled toolchains this job never uses (~25GB: Android SDK,
269+ # GHC, CodeQL, Swift, boost) are still dropped as a safety margin.
260270 - name : Free runner disk space
261271 run : |
262272 sudo rm -rf /usr/local/lib/android /opt/ghc /usr/local/.ghcup \
@@ -293,8 +303,8 @@ jobs:
293303 path : |
294304 node_modules
295305 ~/.bun/install/cache
296- key : smoke-broad -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
297- restore-keys : smoke-broad -${{ runner.os }}-bun-
306+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
307+ restore-keys : deps -${{ runner.os }}-bun-
298308
299309 - name : Install Dependencies
300310 run : bun install --frozen-lockfile
@@ -310,23 +320,24 @@ jobs:
310320 run : |
311321 bun run testing/smoke-test.ts \
312322 --preset pr-broad \
323+ --partition ${{ matrix.shard }}/6 \
313324 --dev-check \
314325 --strict \
315- --output testing/.smoke-output/broad
326+ --output testing/.smoke-output/broad-${{ matrix.shard }}
316327
317328 - name : Post Summary
318329 if : always()
319330 run : |
320- if [ -f testing/.smoke-output/broad/summary.md ]; then
321- cat testing/.smoke-output/broad/summary.md >> "$GITHUB_STEP_SUMMARY"
331+ if [ -f testing/.smoke-output/broad-${{ matrix.shard }} /summary.md ]; then
332+ cat testing/.smoke-output/broad-${{ matrix.shard }} /summary.md >> "$GITHUB_STEP_SUMMARY"
322333 fi
323334
324335 - name : Upload Results
325336 if : always()
326337 uses : actions/upload-artifact@v4
327338 with :
328- name : smoke-strict-broad-results
329- path : testing/.smoke-output/broad/
339+ name : smoke-strict-broad-results-${{ matrix.shard }}
340+ path : testing/.smoke-output/broad-${{ matrix.shard }} /
330341 include-hidden-files : true
331342 if-no-files-found : warn
332343 retention-days : 7
@@ -366,8 +377,8 @@ jobs:
366377 path : |
367378 node_modules
368379 ~/.bun/install/cache
369- key : benchmark-deep -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
370- restore-keys : benchmark-deep -${{ runner.os }}-bun-
380+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
381+ restore-keys : deps -${{ runner.os }}-bun-
371382
372383 - name : Install Dependencies
373384 run : bun install --frozen-lockfile
@@ -423,8 +434,8 @@ jobs:
423434 path : |
424435 node_modules
425436 ~/.bun/install/cache
426- key : pw -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
427- restore-keys : pw -${{ runner.os }}-bun-
437+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
438+ restore-keys : deps -${{ runner.os }}-bun-
428439
429440 - name : Install Dependencies
430441 run : bun install --frozen-lockfile
@@ -474,8 +485,8 @@ jobs:
474485 path : |
475486 node_modules
476487 ~/.bun/install/cache
477- key : web-roundtrip -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
478- restore-keys : web-roundtrip -${{ runner.os }}-bun-
488+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
489+ restore-keys : deps -${{ runner.os }}-bun-
479490
480491 - name : Install Dependencies
481492 run : bun install --frozen-lockfile
@@ -519,8 +530,8 @@ jobs:
519530 with :
520531 path : |
521532 node_modules
522- key : benchmark-install -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
523- restore-keys : benchmark-install -${{ runner.os }}-bun-
533+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
534+ restore-keys : deps -${{ runner.os }}-bun-
524535
525536 - name : Install Dependencies
526537 run : bun install --frozen-lockfile
@@ -564,8 +575,8 @@ jobs:
564575 with :
565576 path : |
566577 node_modules
567- key : package-managers -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
568- restore-keys : package-managers -${{ runner.os }}-bun-
578+ key : deps -${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
579+ restore-keys : deps -${{ runner.os }}-bun-
569580
570581 - name : Install Dependencies
571582 run : bun install --frozen-lockfile
0 commit comments