1 | # Soil wrapped in Github Actions.
|
2 |
|
3 | name: oil
|
4 | on:
|
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
|
25 | env:
|
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 }}
|
31 | jobs:
|
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 | run: |
|
49 | soil/github-actions.sh publish-and-exit raw-vm T
|
50 |
|
51 | dev-setup-debian:
|
52 | runs-on: ubuntu-22.04
|
53 | env:
|
54 | REPO_ROOT: ${{ github.workspace }}
|
55 | steps:
|
56 | - name: Check out repository code
|
57 | uses: actions/checkout@v4
|
58 |
|
59 | - name: dev-setup-debian
|
60 | run: |
|
61 | soil/worker.sh JOB-dev-setup-debian
|
62 |
|
63 | - name: publish-html
|
64 | run: |
|
65 | soil/github-actions.sh publish-and-exit dev-setup-debian T
|
66 |
|
67 | dummy:
|
68 | runs-on: ubuntu-22.04
|
69 | # container: oilshell/soil-dummy
|
70 | env:
|
71 | REPO_ROOT: ${{ github.workspace }}
|
72 | steps:
|
73 | - name: Check out repository code
|
74 | uses: actions/checkout@v4
|
75 |
|
76 | # UPGRADED to podman
|
77 | - name: dummy
|
78 | run: |
|
79 | soil/github-actions.sh run-job dummy podman
|
80 |
|
81 | - name: publish-html
|
82 | run: |
|
83 | soil/github-actions.sh publish-and-exit dummy T
|
84 |
|
85 | dev-minimal:
|
86 | # https://github.com/actions/virtual-environments
|
87 | runs-on: ubuntu-22.04
|
88 | env:
|
89 | REPO_ROOT: ${{ github.workspace }}
|
90 | steps:
|
91 | - name: Check out repository code
|
92 | uses: actions/checkout@v4
|
93 |
|
94 | - name: dev-minimal
|
95 | run: |
|
96 | soil/github-actions.sh run-job dev-minimal
|
97 |
|
98 | - name: publish-html
|
99 | run: |
|
100 | soil/github-actions.sh publish-and-exit dev-minimal T
|
101 |
|
102 | interactive:
|
103 | runs-on: ubuntu-22.04
|
104 | env:
|
105 | REPO_ROOT: ${{ github.workspace }}
|
106 | steps:
|
107 | - name: Check out repository code
|
108 | uses: actions/checkout@v4
|
109 |
|
110 | - name: Fix kernel mmap rnd bits
|
111 | # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
|
112 | # high-entropy ASLR in much newer kernels that GitHub runners are
|
113 | # using leading to random crashes: https://reviews.llvm.org/D148280
|
114 | run: sudo sysctl vm.mmap_rnd_bits=28
|
115 |
|
116 | - name: interactive
|
117 | run: |
|
118 | soil/github-actions.sh run-job interactive
|
119 |
|
120 | - name: publish-html
|
121 | run: |
|
122 | soil/github-actions.sh publish-and-exit interactive T
|
123 |
|
124 | pea:
|
125 | runs-on: ubuntu-22.04
|
126 | env:
|
127 | REPO_ROOT: ${{ github.workspace }}
|
128 | steps:
|
129 | - name: Check out repository code
|
130 | uses: actions/checkout@v4
|
131 |
|
132 | # UPGRADED to podman
|
133 | - name: pea
|
134 | run: |
|
135 | soil/github-actions.sh run-job pea podman
|
136 |
|
137 | - name: publish-html
|
138 | run: |
|
139 | soil/github-actions.sh publish-and-exit pea T
|
140 |
|
141 | other-tests:
|
142 | runs-on: ubuntu-22.04
|
143 | env:
|
144 | REPO_ROOT: ${{ github.workspace }}
|
145 | steps:
|
146 | - name: Check out repository code
|
147 | uses: actions/checkout@v4
|
148 |
|
149 | - name: other-tests
|
150 | run: |
|
151 | soil/github-actions.sh run-job other-tests
|
152 |
|
153 | - name: publish-html
|
154 | run: |
|
155 | soil/github-actions.sh publish-and-exit other-tests T
|
156 |
|
157 | ovm-tarball:
|
158 | runs-on: ubuntu-22.04
|
159 | env:
|
160 | REPO_ROOT: ${{ github.workspace }}
|
161 | steps:
|
162 | - name: Check out repository code
|
163 | uses: actions/checkout@v4
|
164 |
|
165 | - name: ovm-tarball
|
166 | run: |
|
167 | soil/github-actions.sh run-job ovm-tarball
|
168 |
|
169 | - name: publish-html
|
170 | run: |
|
171 | soil/github-actions.sh publish-and-exit ovm-tarball T
|
172 |
|
173 | app-tests:
|
174 | runs-on: ubuntu-22.04
|
175 | env:
|
176 | REPO_ROOT: ${{ github.workspace }}
|
177 | needs: ['cpp-tarball']
|
178 | steps:
|
179 | - name: Check out repository code
|
180 | uses: actions/checkout@v4
|
181 |
|
182 | - name: app-tests
|
183 | run: |
|
184 | soil/github-actions.sh run-job app-tests
|
185 |
|
186 | - name: publish-html
|
187 | run: |
|
188 | soil/github-actions.sh publish-and-exit app-tests T
|
189 |
|
190 | cpp-coverage:
|
191 | runs-on: ubuntu-22.04
|
192 | env:
|
193 | REPO_ROOT: ${{ github.workspace }}
|
194 | steps:
|
195 | - name: Check out repository code
|
196 | uses: actions/checkout@v4
|
197 |
|
198 | - name: cpp-coverage
|
199 | run: |
|
200 | soil/github-actions.sh run-job cpp-coverage
|
201 |
|
202 | - name: publish-html
|
203 | run: |
|
204 | soil/github-actions.sh publish-and-exit cpp-coverage T
|
205 |
|
206 | benchmarks:
|
207 | runs-on: ubuntu-22.04
|
208 | env:
|
209 | REPO_ROOT: ${{ github.workspace }}
|
210 | steps:
|
211 | - name: Check out repository code
|
212 | uses: actions/checkout@v4
|
213 |
|
214 | - name: benchmarks
|
215 | run: |
|
216 | soil/github-actions.sh run-job benchmarks
|
217 |
|
218 | - name: publish-html
|
219 | run: |
|
220 | soil/github-actions.sh publish-and-exit benchmarks T
|
221 |
|
222 | bloaty:
|
223 | needs: ['cpp-tarball']
|
224 | runs-on: ubuntu-22.04
|
225 | env:
|
226 | REPO_ROOT: ${{ github.workspace }}
|
227 | steps:
|
228 | - name: Check out repository code
|
229 | uses: actions/checkout@v4
|
230 |
|
231 | - name: bloaty
|
232 | run: |
|
233 | soil/github-actions.sh run-job bloaty
|
234 |
|
235 | - name: publish-html
|
236 | run: |
|
237 | soil/github-actions.sh publish-and-exit bloaty T
|
238 |
|
239 | benchmarks2:
|
240 | needs: ['cpp-tarball']
|
241 | runs-on: ubuntu-22.04
|
242 | env:
|
243 | REPO_ROOT: ${{ github.workspace }}
|
244 | steps:
|
245 | - name: Check out repository code
|
246 | uses: actions/checkout@v4
|
247 |
|
248 | - name: benchmarks2
|
249 | run: |
|
250 | soil/github-actions.sh run-job benchmarks2
|
251 |
|
252 | - name: publish-html
|
253 | run: |
|
254 | soil/github-actions.sh publish-and-exit benchmarks2 T
|
255 |
|
256 | cpp-small:
|
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: Fix kernel mmap rnd bits
|
265 | # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
|
266 | # high-entropy ASLR in much newer kernels that GitHub runners are
|
267 | # using leading to random crashes: https://reviews.llvm.org/D148280
|
268 | run: sudo sysctl vm.mmap_rnd_bits=28
|
269 |
|
270 | - name: cpp-small
|
271 | run: |
|
272 | soil/github-actions.sh run-job cpp-small
|
273 |
|
274 | - name: publish-html
|
275 | run: |
|
276 | soil/github-actions.sh publish-and-exit cpp-small T
|
277 |
|
278 | cpp-tarball:
|
279 | runs-on: ubuntu-22.04
|
280 | env:
|
281 | REPO_ROOT: ${{ github.workspace }}
|
282 | steps:
|
283 | - name: Check out repository code
|
284 | uses: actions/checkout@v4
|
285 |
|
286 | - name: Fix kernel mmap rnd bits
|
287 | # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
|
288 | # high-entropy ASLR in much newer kernels that GitHub runners are
|
289 | # using leading to random crashes: https://reviews.llvm.org/D148280
|
290 | run: sudo sysctl vm.mmap_rnd_bits=28
|
291 |
|
292 | - name: cpp-tarball
|
293 | run: |
|
294 | soil/github-actions.sh run-job cpp-tarball
|
295 |
|
296 | # can't be done inside container
|
297 | - name: publish-cpp-tarball
|
298 | env:
|
299 | # auth for web server
|
300 | OILS_GITHUB_KEY: ${{ secrets.OILS_GITHUB_KEY }}
|
301 | run: |
|
302 | soil/github-actions.sh publish-cpp-tarball
|
303 |
|
304 | - name: publish-html
|
305 | run: |
|
306 | soil/github-actions.sh publish-and-exit cpp-tarball T
|
307 |
|
308 | cpp-spec:
|
309 | runs-on: ubuntu-22.04
|
310 | env:
|
311 | REPO_ROOT: ${{ github.workspace }}
|
312 | steps:
|
313 | - name: Check out repository code
|
314 | uses: actions/checkout@v4
|
315 |
|
316 | - name: Fix kernel mmap rnd bits
|
317 | # Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
|
318 | # high-entropy ASLR in much newer kernels that GitHub runners are
|
319 | # using leading to random crashes: https://reviews.llvm.org/D148280
|
320 | run: sudo sysctl vm.mmap_rnd_bits=28
|
321 |
|
322 | - name: cpp-spec
|
323 | run: |
|
324 | soil/github-actions.sh run-job cpp-spec
|
325 |
|
326 | - name: publish-html
|
327 | run: |
|
328 | soil/github-actions.sh publish-and-exit cpp-spec T
|
329 |
|
330 | wild:
|
331 | runs-on: ubuntu-22.04
|
332 | env:
|
333 | REPO_ROOT: ${{ github.workspace }}
|
334 | needs: ['cpp-tarball']
|
335 | steps:
|
336 | - name: Check out repository code
|
337 | uses: actions/checkout@v4
|
338 |
|
339 | - name: wild
|
340 | run: |
|
341 | soil/github-actions.sh run-job wild
|
342 |
|
343 | - name: publish-html
|
344 | run: |
|
345 | soil/github-actions.sh publish-and-exit wild T
|
346 |
|
347 | maybe-merge-to-master:
|
348 | runs-on: ubuntu-22.04
|
349 | env:
|
350 | REPO_ROOT: ${{ github.workspace }}
|
351 | # List of tasks to wait on. Copied from soil/worker.sh list-jobs
|
352 | 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']
|
353 | #needs: ['dummy', 'pea', 'other-tests']
|
354 | steps:
|
355 | - name: Check out repository code
|
356 | uses: actions/checkout@v4
|
357 |
|
358 | - name: maybe-merge
|
359 | env:
|
360 | SOIL_GITHUB_API_TOKEN: ${{ secrets.SOIL_GITHUB_API_TOKEN }}
|
361 | run: |
|
362 | soil/worker.sh JOB-maybe-merge
|
363 |
|
364 | - name: publish-html
|
365 | run: |
|
366 | # NOTE: does not publish to status API
|
367 | soil/github-actions.sh publish-and-exit maybe-merge
|