Commit 43a1ef2
committed
CI: Build examples in parallel on pull requests
The `build-examples` job built all examples sequentially in a single job,
taking ~57 minutes - each example is its own SwiftPM package that recompiles
JavaScriptKit and swift-syntax from scratch, with no sharing between them.
Split the job by event:
- Pull requests fan out a matrix `build-example` with one job per example,
built in debug. Parallelism collapses the wall-clock time to that of the
slowest single example, and debug skips the wasm optimization PRs don't
need. An aggregate `build-examples` job gates on the matrix so the existing
required status check of that name keeps working.
- `main` keeps the full release build of all examples plus the GitHub Pages
deploy (`build-examples-deploy`), so published artifacts are unchanged.
Each matrix step runs `build.sh` from the example directory (via
`working-directory`), matching Utilities/build-examples.sh - the example
`build.sh` scripts resolve the SwiftPM package from the working directory.
No caching is introduced here.1 parent ebbde04 commit 43a1ef2
1 file changed
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
158 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
159 | 205 | | |
160 | 206 | | |
161 | 207 | | |
| |||
184 | 230 | | |
185 | 231 | | |
186 | 232 | | |
187 | | - | |
| 233 | + | |
188 | 234 | | |
189 | 235 | | |
190 | 236 | | |
| |||
0 commit comments