| 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@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: cpp-small
|
| 277 | run: |
|
| 278 | soil/github-actions.sh run-job cpp-small
|
| 279 |
|
| 280 | - name: publish-html
|
| 281 | env:
|
| 282 | # for deploying to dashboard
|
| 283 | TOIL_KEY: ${{ secrets.TOIL_KEY }}
|
| 284 | run: |
|
| 285 | soil/github-actions.sh publish-and-exit cpp-small T
|
| 286 |
|
| 287 | cpp-tarball:
|
| 288 | runs-on: ubuntu-22.04
|
| 289 | env:
|
| 290 | REPO_ROOT: ${{ github.workspace }}
|
| 291 | steps:
|
| 292 | - name: Check out repository code
|
| 293 | uses: actions/checkout@v3
|
| 294 |
|
| 295 | - name: cpp-tarball
|
| 296 | run: |
|
| 297 | soil/github-actions.sh run-job cpp-tarball
|
| 298 |
|
| 299 | # can't be done inside container
|
| 300 | - name: publish-cpp-tarball
|
| 301 | env:
|
| 302 | # auth for web server
|
| 303 | TOIL_KEY: ${{ secrets.TOIL_KEY }}
|
| 304 | run: |
|
| 305 | soil/github-actions.sh publish-cpp-tarball
|
| 306 |
|
| 307 | - name: publish-html
|
| 308 | env:
|
| 309 | TOIL_KEY: ${{ secrets.TOIL_KEY }}
|
| 310 | run: |
|
| 311 | soil/github-actions.sh publish-and-exit cpp-tarball T
|
| 312 |
|
| 313 | cpp-spec:
|
| 314 | runs-on: ubuntu-22.04
|
| 315 | env:
|
| 316 | REPO_ROOT: ${{ github.workspace }}
|
| 317 | steps:
|
| 318 | - name: Check out repository code
|
| 319 | uses: actions/checkout@v3
|
| 320 |
|
| 321 | - name: cpp-spec
|
| 322 | run: |
|
| 323 | soil/github-actions.sh run-job cpp-spec
|
| 324 |
|
| 325 | - name: publish-html
|
| 326 | env:
|
| 327 | # for deploying to dashboard
|
| 328 | TOIL_KEY: ${{ secrets.TOIL_KEY }}
|
| 329 | run: |
|
| 330 | soil/github-actions.sh publish-and-exit cpp-spec T
|
| 331 |
|
| 332 | wild:
|
| 333 | runs-on: ubuntu-22.04
|
| 334 | env:
|
| 335 | REPO_ROOT: ${{ github.workspace }}
|
| 336 | needs: ['cpp-tarball']
|
| 337 | steps:
|
| 338 | - name: Check out repository code
|
| 339 | uses: actions/checkout@v3
|
| 340 |
|
| 341 | - name: wild
|
| 342 | run: |
|
| 343 | soil/github-actions.sh run-job wild
|
| 344 |
|
| 345 | - name: publish-html
|
| 346 | env:
|
| 347 | # for deploying to dashboard
|
| 348 | TOIL_KEY: ${{ secrets.TOIL_KEY }}
|
| 349 | run: |
|
| 350 | soil/github-actions.sh publish-and-exit wild T
|
| 351 |
|
| 352 | maybe-merge-to-master:
|
| 353 | runs-on: ubuntu-22.04
|
| 354 | env:
|
| 355 | REPO_ROOT: ${{ github.workspace }}
|
| 356 | # List of tasks to wait on. Copied from soil/worker.sh list-jobs
|
| 357 | 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']
|
| 358 | #needs: ['dummy', 'pea', 'other-tests']
|
| 359 | steps:
|
| 360 | - name: Check out repository code
|
| 361 | uses: actions/checkout@v3
|
| 362 |
|
| 363 | - name: maybe-merge
|
| 364 | env:
|
| 365 | SOIL_GITHUB_API_TOKEN: ${{ secrets.SOIL_GITHUB_API_TOKEN }}
|
| 366 | run: |
|
| 367 | soil/worker.sh JOB-maybe-merge
|
| 368 |
|
| 369 | - name: publish-html
|
| 370 | env:
|
| 371 | # for deploying to dashboard
|
| 372 | TOIL_KEY: ${{ secrets.TOIL_KEY }}
|
| 373 | run: |
|
| 374 | # NOTE: does not publish to status API
|
| 375 | soil/github-actions.sh publish-and-exit maybe-merge
|