build.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: 'Build (All)'
  2. on:
  3. push:
  4. paths-ignore:
  5. - 'docs/**'
  6. - '*.md'
  7. pull_request:
  8. paths-ignore:
  9. - 'docs/**'
  10. - '*.md'
  11. schedule:
  12. # ┌────────────── minute (0 - 59)
  13. # │ ┌───────────── hour (0 - 23)
  14. # │ │ ┌───────────── day of the month (1 - 31)
  15. # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
  16. # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
  17. # │ │ │ │ │
  18. - cron: '0 18 * * *'
  19. concurrency:
  20. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
  21. cancel-in-progress: true
  22. jobs:
  23. controller:
  24. name: 'Create test plan'
  25. runs-on: 'ubuntu-slim'
  26. if: ${{ (github.event_name == 'schedule' && github.repository == 'libsdl-org/sdl') || github.event_name != 'schedule' }}
  27. outputs:
  28. platforms-level1: ${{ steps.plan.outputs.platforms-level1 }}
  29. platforms-others: ${{ steps.plan.outputs.platforms-others }}
  30. steps:
  31. - uses: actions/setup-python@main
  32. with:
  33. python-version: 3.x
  34. - uses: actions/checkout@main
  35. with:
  36. sparse-checkout: '.github/workflows/create-test-plan.py'
  37. - name: 'Create plan'
  38. id: plan
  39. env:
  40. COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
  41. run: |
  42. # Adding [sdl-ci-filter GLOB] to the commit message will limit the jobs
  43. # e.g. [sdl-ci-filter msvc-*]
  44. printf '%s\n' "$COMMIT_MESSAGE" >/tmp/commit_message.txt
  45. python .github/workflows/create-test-plan.py \
  46. ${{ (github.event_name != 'schedule' && '--priority-only') || '' }} \
  47. --github-variable-prefix platforms \
  48. --github-ci \
  49. --verbose \
  50. ${{ (github.repository_owner != 'libsdl-org' && '--no-artifact') || '' }} \
  51. --commit-message-file /tmp/commit_message.txt
  52. level1:
  53. needs: [controller]
  54. uses: './.github/workflows/generic.yml'
  55. with:
  56. platforms: ${{ needs.controller.outputs.platforms-level1 }}
  57. level2:
  58. needs: [controller, level1]
  59. uses: './.github/workflows/generic.yml'
  60. with:
  61. platforms: ${{ needs.controller.outputs.platforms-others }}