Commit 166377f
committed
CI: Cache example .build to speed up warm example builds
Cache each example's `.build` plus the SwiftPM dependency cache, keyed on the
workflow file and the example's Package.resolved. On a warm cache the matrix
jobs skip recompiling swift-syntax (pulled in by the @js macro plugin and
BridgeJSTool), which dominates a cold example build.
Measured per-example wall-clock on the example matrix:
no cache: ~10 min
cold (miss + save): ~10-12 min
warm (hit): ~1-2 min
Cold runs - the first run, or whenever Package.resolved or the workflow file
change - pay a small cache-save overhead. Warm runs, the common case, drop the
example matrix from ~10 min to ~2 min. GitHub's 10 GB cache budget is shared
across the six example `.build` caches, so heavy eviction falls back to cold.1 parent 46d2ded commit 166377f
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
| |||
0 commit comments