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

393 lines, 337 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@v3
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 TOIL_KEY: ${{ secrets.TOIL_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@v3
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 TOIL_KEY: ${{ secrets.TOIL_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@v3
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 TOIL_KEY: ${{ secrets.TOIL_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@v3
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 TOIL_KEY: ${{ secrets.TOIL_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@v3
121
122 - name: interactive
123 run: |
124 soil/github-actions.sh run-job interactive
125
126 - name: publish-html
127 env:
128 # for deploying to dashboard
129 TOIL_KEY: ${{ secrets.TOIL_KEY }}
130 run: |
131 soil/github-actions.sh publish-and-exit interactive T
132
133 pea:
134 runs-on: ubuntu-22.04
135 env:
136 REPO_ROOT: ${{ github.workspace }}
137 steps:
138 - name: Check out repository code
139 uses: actions/checkout@v3
140
141 # UPGRADED to podman
142 - name: pea
143 run: |
144 soil/github-actions.sh run-job pea podman
145
146 - name: publish-html
147 env:
148 # for deploying to dashboard
149 TOIL_KEY: ${{ secrets.TOIL_KEY }}
150 run: |
151 soil/github-actions.sh publish-and-exit pea T
152
153 other-tests:
154 runs-on: ubuntu-22.04
155 env:
156 REPO_ROOT: ${{ github.workspace }}
157 steps:
158 - name: Check out repository code
159 uses: actions/checkout@v3
160
161 - name: other-tests
162 run: |
163 soil/github-actions.sh run-job other-tests
164
165 - name: publish-html
166 env:
167 # for deploying to dashboard
168 TOIL_KEY: ${{ secrets.TOIL_KEY }}
169 run: |
170 soil/github-actions.sh publish-and-exit other-tests T
171
172 ovm-tarball:
173 runs-on: ubuntu-22.04
174 env:
175 REPO_ROOT: ${{ github.workspace }}
176 steps:
177 - name: Check out repository code
178 uses: actions/checkout@v3
179
180 - name: ovm-tarball
181 run: |
182 soil/github-actions.sh run-job ovm-tarball
183
184 - name: publish-html
185 env:
186 # for deploying to dashboard
187 TOIL_KEY: ${{ secrets.TOIL_KEY }}
188 run: |
189 soil/github-actions.sh publish-and-exit ovm-tarball T
190
191 app-tests:
192 runs-on: ubuntu-22.04
193 env:
194 REPO_ROOT: ${{ github.workspace }}
195 needs: ['cpp-tarball']
196 steps:
197 - name: Check out repository code
198 uses: actions/checkout@v3
199
200 - name: app-tests
201 run: |
202 soil/github-actions.sh run-job app-tests
203
204 - name: publish-html
205 env:
206 # for deploying to dashboard
207 TOIL_KEY: ${{ secrets.TOIL_KEY }}
208 run: |
209 soil/github-actions.sh publish-and-exit app-tests T
210
211 cpp-coverage:
212 runs-on: ubuntu-22.04
213 env:
214 REPO_ROOT: ${{ github.workspace }}
215 steps:
216 - name: Check out repository code
217 uses: actions/checkout@v3
218
219 - name: cpp-coverage
220 run: |
221 soil/github-actions.sh run-job cpp-coverage
222
223 - name: publish-html
224 env:
225 # for deploying to dashboard
226 TOIL_KEY: ${{ secrets.TOIL_KEY }}
227 run: |
228 soil/github-actions.sh publish-and-exit cpp-coverage T
229
230 benchmarks:
231 runs-on: ubuntu-22.04
232 env:
233 REPO_ROOT: ${{ github.workspace }}
234 steps:
235 - name: Check out repository code
236 uses: actions/checkout@v3
237
238 - name: benchmarks
239 run: |
240 soil/github-actions.sh run-job benchmarks
241
242 - name: publish-html
243 env:
244 # for deploying to dashboard
245 TOIL_KEY: ${{ secrets.TOIL_KEY }}
246 run: |
247 soil/github-actions.sh publish-and-exit benchmarks T
248
249 benchmarks2:
250 runs-on: ubuntu-22.04
251 env:
252 REPO_ROOT: ${{ github.workspace }}
253 steps:
254 - name: Check out repository code
255 uses: actions/checkout@v3
256
257 - name: benchmarks2
258 run: |
259 soil/github-actions.sh run-job benchmarks2
260
261 - name: publish-html
262 env:
263 # for deploying to dashboard
264 TOIL_KEY: ${{ secrets.TOIL_KEY }}
265 run: |
266 soil/github-actions.sh publish-and-exit benchmarks2 T
267
268 cpp-small:
269 runs-on: ubuntu-22.04
270 env:
271 REPO_ROOT: ${{ github.workspace }}
272 steps:
273 - name: Check out repository code
274 uses: actions/checkout@v3
275
276 - name: Fix kernel mmap rnd bits
277 # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
278 # high-entropy ASLR in much newer kernels that GitHub runners are
279 # using leading to random crashes: https://reviews.llvm.org/D148280
280 run: sudo sysctl vm.mmap_rnd_bits=28
281
282 - name: cpp-small
283 run: |
284 soil/github-actions.sh run-job cpp-small
285
286 - name: publish-html
287 env:
288 # for deploying to dashboard
289 TOIL_KEY: ${{ secrets.TOIL_KEY }}
290 run: |
291 soil/github-actions.sh publish-and-exit cpp-small T
292
293 cpp-tarball:
294 runs-on: ubuntu-22.04
295 env:
296 REPO_ROOT: ${{ github.workspace }}
297 steps:
298 - name: Check out repository code
299 uses: actions/checkout@v3
300
301 - name: Fix kernel mmap rnd bits
302 # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
303 # high-entropy ASLR in much newer kernels that GitHub runners are
304 # using leading to random crashes: https://reviews.llvm.org/D148280
305 run: sudo sysctl vm.mmap_rnd_bits=28
306
307 - name: cpp-tarball
308 run: |
309 soil/github-actions.sh run-job cpp-tarball
310
311 # can't be done inside container
312 - name: publish-cpp-tarball
313 env:
314 # auth for web server
315 TOIL_KEY: ${{ secrets.TOIL_KEY }}
316 run: |
317 soil/github-actions.sh publish-cpp-tarball
318
319 - name: publish-html
320 env:
321 TOIL_KEY: ${{ secrets.TOIL_KEY }}
322 run: |
323 soil/github-actions.sh publish-and-exit cpp-tarball T
324
325 cpp-spec:
326 runs-on: ubuntu-22.04
327 env:
328 REPO_ROOT: ${{ github.workspace }}
329 steps:
330 - name: Check out repository code
331 uses: actions/checkout@v3
332
333 - name: Fix kernel mmap rnd bits
334 # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
335 # high-entropy ASLR in much newer kernels that GitHub runners are
336 # using leading to random crashes: https://reviews.llvm.org/D148280
337 run: sudo sysctl vm.mmap_rnd_bits=28
338
339 - name: cpp-spec
340 run: |
341 soil/github-actions.sh run-job cpp-spec
342
343 - name: publish-html
344 env:
345 # for deploying to dashboard
346 TOIL_KEY: ${{ secrets.TOIL_KEY }}
347 run: |
348 soil/github-actions.sh publish-and-exit cpp-spec T
349
350 wild:
351 runs-on: ubuntu-22.04
352 env:
353 REPO_ROOT: ${{ github.workspace }}
354 needs: ['cpp-tarball']
355 steps:
356 - name: Check out repository code
357 uses: actions/checkout@v3
358
359 - name: wild
360 run: |
361 soil/github-actions.sh run-job wild
362
363 - name: publish-html
364 env:
365 # for deploying to dashboard
366 TOIL_KEY: ${{ secrets.TOIL_KEY }}
367 run: |
368 soil/github-actions.sh publish-and-exit wild T
369
370 maybe-merge-to-master:
371 runs-on: ubuntu-22.04
372 env:
373 REPO_ROOT: ${{ github.workspace }}
374 # List of tasks to wait on. Copied from soil/worker.sh list-jobs
375 needs: ['dummy', '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']
376 #needs: ['dummy', 'pea', 'other-tests']
377 steps:
378 - name: Check out repository code
379 uses: actions/checkout@v3
380
381 - name: maybe-merge
382 env:
383 SOIL_GITHUB_API_TOKEN: ${{ secrets.SOIL_GITHUB_API_TOKEN }}
384 run: |
385 soil/worker.sh JOB-maybe-merge
386
387 - name: publish-html
388 env:
389 # for deploying to dashboard
390 TOIL_KEY: ${{ secrets.TOIL_KEY }}
391 run: |
392 # NOTE: does not publish to status API
393 soil/github-actions.sh publish-and-exit maybe-merge