OILS / .github / workflows / all-builds.yml View on Github | oilshell.org

420 lines, 360 significant
1# Soil wrapped in Github Actions.
2
3name: oil
4on:
5 # We are running into the pitfall here
6 # https://fusectore.dev/2022/09/25/github-actions-pitfalls.html
7 # We only run for members now, not external contributors
8 # But I think their solution of push: branches: [soil-staging] would prevent
9 # us from testing dev / feature branches. We would have to create a PR
10 # first?
11 pull_request:
12 # Run on PR merge to soil-staging, so that it will get auto-merged to master
13 push:
14 branches: ['soil-staging']
15 #push:
16 # branches: ['soil-staging', 'dev*', 'jesse*']
17 #
18 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
19 # I think that is sufficient for dev branches.
20
21 # don't run CI on master because we test soil-staging and auto-merge.
22 #push:
23 # branches-ignore:
24 # - master
25env:
26 # Only set for PR runs.
27 # https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
28 GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
29 GITHUB_PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
30 GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
31jobs:
32 # The perf tool depends on a specific version of a kernel, so run it outside
33 # a container.
34 raw-vm:
35 runs-on: ubuntu-22.04
36 env:
37 REPO_ROOT: ${{ github.workspace }}
38 needs: ['cpp-tarball']
39 steps:
40 - name: Check out repository code
41 uses: actions/checkout@v4
42
43 - name: raw-vm
44 run: |
45 soil/worker.sh JOB-raw-vm
46
47 - name: publish-html
48 env:
49 # for deploying to dashboard
50 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
51 run: |
52 soil/github-actions.sh publish-and-exit raw-vm T
53
54 dev-setup-debian:
55 runs-on: ubuntu-22.04
56 env:
57 REPO_ROOT: ${{ github.workspace }}
58 steps:
59 - name: Check out repository code
60 uses: actions/checkout@v4
61
62 - name: dev-setup-debian
63 run: |
64 soil/worker.sh JOB-dev-setup-debian
65
66 - name: publish-html
67 env:
68 # for deploying to dashboard
69 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
70 run: |
71 soil/github-actions.sh publish-and-exit dev-setup-debian T
72
73 dummy:
74 runs-on: ubuntu-22.04
75 # container: oilshell/soil-dummy
76 env:
77 REPO_ROOT: ${{ github.workspace }}
78 steps:
79 - name: Check out repository code
80 uses: actions/checkout@v4
81
82 # UPGRADED to podman
83 - name: dummy
84 run: |
85 soil/github-actions.sh run-job dummy podman
86
87 - name: publish-html
88 env:
89 # for deploying to dashboard
90 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
91 run: |
92 soil/github-actions.sh publish-and-exit dummy T
93
94 dev-minimal:
95 # https://github.com/actions/virtual-environments
96 runs-on: ubuntu-22.04
97 env:
98 REPO_ROOT: ${{ github.workspace }}
99 steps:
100 - name: Check out repository code
101 uses: actions/checkout@v4
102
103 - name: dev-minimal
104 run: |
105 soil/github-actions.sh run-job dev-minimal
106
107 - name: publish-html
108 env:
109 # for deploying to dashboard
110 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
111 run: |
112 soil/github-actions.sh publish-and-exit dev-minimal T
113
114 interactive:
115 runs-on: ubuntu-22.04
116 env:
117 REPO_ROOT: ${{ github.workspace }}
118 steps:
119 - name: Check out repository code
120 uses: actions/checkout@v4
121
122 - name: Fix kernel mmap rnd bits
123 # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
124 # high-entropy ASLR in much newer kernels that GitHub runners are
125 # using leading to random crashes: https://reviews.llvm.org/D148280
126 run: sudo sysctl vm.mmap_rnd_bits=28
127
128 - name: interactive
129 run: |
130 soil/github-actions.sh run-job interactive
131
132 - name: publish-html
133 env:
134 # for deploying to dashboard
135 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
136 run: |
137 soil/github-actions.sh publish-and-exit interactive T
138
139 pea:
140 runs-on: ubuntu-22.04
141 env:
142 REPO_ROOT: ${{ github.workspace }}
143 steps:
144 - name: Check out repository code
145 uses: actions/checkout@v4
146
147 # UPGRADED to podman
148 - name: pea
149 run: |
150 soil/github-actions.sh run-job pea podman
151
152 - name: publish-html
153 env:
154 # for deploying to dashboard
155 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
156 run: |
157 soil/github-actions.sh publish-and-exit pea T
158
159 other-tests:
160 runs-on: ubuntu-22.04
161 env:
162 REPO_ROOT: ${{ github.workspace }}
163 steps:
164 - name: Check out repository code
165 uses: actions/checkout@v4
166
167 - name: other-tests
168 run: |
169 soil/github-actions.sh run-job other-tests
170
171 - name: publish-html
172 env:
173 # for deploying to dashboard
174 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
175 run: |
176 soil/github-actions.sh publish-and-exit other-tests T
177
178 ovm-tarball:
179 runs-on: ubuntu-22.04
180 env:
181 REPO_ROOT: ${{ github.workspace }}
182 steps:
183 - name: Check out repository code
184 uses: actions/checkout@v4
185
186 - name: ovm-tarball
187 run: |
188 soil/github-actions.sh run-job ovm-tarball
189
190 - name: publish-html
191 env:
192 # for deploying to dashboard
193 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
194 run: |
195 soil/github-actions.sh publish-and-exit ovm-tarball T
196
197 app-tests:
198 runs-on: ubuntu-22.04
199 env:
200 REPO_ROOT: ${{ github.workspace }}
201 needs: ['cpp-tarball']
202 steps:
203 - name: Check out repository code
204 uses: actions/checkout@v4
205
206 - name: app-tests
207 run: |
208 soil/github-actions.sh run-job app-tests
209
210 - name: publish-html
211 env:
212 # for deploying to dashboard
213 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
214 run: |
215 soil/github-actions.sh publish-and-exit app-tests T
216
217 cpp-coverage:
218 runs-on: ubuntu-22.04
219 env:
220 REPO_ROOT: ${{ github.workspace }}
221 steps:
222 - name: Check out repository code
223 uses: actions/checkout@v4
224
225 - name: cpp-coverage
226 run: |
227 soil/github-actions.sh run-job cpp-coverage
228
229 - name: publish-html
230 env:
231 # for deploying to dashboard
232 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
233 run: |
234 soil/github-actions.sh publish-and-exit cpp-coverage T
235
236 benchmarks:
237 runs-on: ubuntu-22.04
238 env:
239 REPO_ROOT: ${{ github.workspace }}
240 steps:
241 - name: Check out repository code
242 uses: actions/checkout@v4
243
244 - name: benchmarks
245 run: |
246 soil/github-actions.sh run-job benchmarks
247
248 - name: publish-html
249 env:
250 # for deploying to dashboard
251 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
252 run: |
253 soil/github-actions.sh publish-and-exit benchmarks T
254
255 bloaty:
256 needs: ['cpp-tarball']
257 runs-on: ubuntu-22.04
258 env:
259 REPO_ROOT: ${{ github.workspace }}
260 steps:
261 - name: Check out repository code
262 uses: actions/checkout@v4
263
264 - name: bloaty
265 run: |
266 soil/github-actions.sh run-job bloaty
267
268 - name: publish-html
269 env:
270 # for deploying to dashboard
271 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
272 run: |
273 soil/github-actions.sh publish-and-exit bloaty T
274
275 benchmarks2:
276 needs: ['cpp-tarball']
277 runs-on: ubuntu-22.04
278 env:
279 REPO_ROOT: ${{ github.workspace }}
280 steps:
281 - name: Check out repository code
282 uses: actions/checkout@v4
283
284 - name: benchmarks2
285 run: |
286 soil/github-actions.sh run-job benchmarks2
287
288 - name: publish-html
289 env:
290 # for deploying to dashboard
291 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
292 run: |
293 soil/github-actions.sh publish-and-exit benchmarks2 T
294
295 cpp-small:
296 runs-on: ubuntu-22.04
297 env:
298 REPO_ROOT: ${{ github.workspace }}
299 steps:
300 - name: Check out repository code
301 uses: actions/checkout@v4
302
303 - name: Fix kernel mmap rnd bits
304 # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
305 # high-entropy ASLR in much newer kernels that GitHub runners are
306 # using leading to random crashes: https://reviews.llvm.org/D148280
307 run: sudo sysctl vm.mmap_rnd_bits=28
308
309 - name: cpp-small
310 run: |
311 soil/github-actions.sh run-job cpp-small
312
313 - name: publish-html
314 env:
315 # for deploying to dashboard
316 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
317 run: |
318 soil/github-actions.sh publish-and-exit cpp-small T
319
320 cpp-tarball:
321 runs-on: ubuntu-22.04
322 env:
323 REPO_ROOT: ${{ github.workspace }}
324 steps:
325 - name: Check out repository code
326 uses: actions/checkout@v4
327
328 - name: Fix kernel mmap rnd bits
329 # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
330 # high-entropy ASLR in much newer kernels that GitHub runners are
331 # using leading to random crashes: https://reviews.llvm.org/D148280
332 run: sudo sysctl vm.mmap_rnd_bits=28
333
334 - name: cpp-tarball
335 run: |
336 soil/github-actions.sh run-job cpp-tarball
337
338 # can't be done inside container
339 - name: publish-cpp-tarball
340 env:
341 # auth for web server
342 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
343 run: |
344 soil/github-actions.sh publish-cpp-tarball
345
346 - name: publish-html
347 env:
348 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
349 run: |
350 soil/github-actions.sh publish-and-exit cpp-tarball T
351
352 cpp-spec:
353 runs-on: ubuntu-22.04
354 env:
355 REPO_ROOT: ${{ github.workspace }}
356 steps:
357 - name: Check out repository code
358 uses: actions/checkout@v4
359
360 - name: Fix kernel mmap rnd bits
361 # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
362 # high-entropy ASLR in much newer kernels that GitHub runners are
363 # using leading to random crashes: https://reviews.llvm.org/D148280
364 run: sudo sysctl vm.mmap_rnd_bits=28
365
366 - name: cpp-spec
367 run: |
368 soil/github-actions.sh run-job cpp-spec
369
370 - name: publish-html
371 env:
372 # for deploying to dashboard
373 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
374 run: |
375 soil/github-actions.sh publish-and-exit cpp-spec T
376
377 wild:
378 runs-on: ubuntu-22.04
379 env:
380 REPO_ROOT: ${{ github.workspace }}
381 needs: ['cpp-tarball']
382 steps:
383 - name: Check out repository code
384 uses: actions/checkout@v4
385
386 - name: wild
387 run: |
388 soil/github-actions.sh run-job wild
389
390 - name: publish-html
391 env:
392 # for deploying to dashboard
393 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
394 run: |
395 soil/github-actions.sh publish-and-exit wild T
396
397 maybe-merge-to-master:
398 runs-on: ubuntu-22.04
399 env:
400 REPO_ROOT: ${{ github.workspace }}
401 # List of tasks to wait on. Copied from soil/worker.sh list-jobs
402 needs: ['dummy', 'bloaty', 'benchmarks', 'benchmarks2', 'dev-minimal', 'cpp-coverage', 'cpp-small', 'cpp-spec', 'cpp-tarball', 'interactive', 'ovm-tarball', 'pea', 'other-tests', 'app-tests', 'wild', 'raw-vm', 'dev-setup-debian']
403 #needs: ['dummy', 'pea', 'other-tests']
404 steps:
405 - name: Check out repository code
406 uses: actions/checkout@v4
407
408 - name: maybe-merge
409 env:
410 SOIL_GITHUB_API_TOKEN: ${{ secrets.SOIL_GITHUB_API_TOKEN }}
411 run: |
412 soil/worker.sh JOB-maybe-merge
413
414 - name: publish-html
415 env:
416 # for deploying to dashboard
417 OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
418 run: |
419 # NOTE: does not publish to status API
420 soil/github-actions.sh publish-and-exit maybe-merge