build.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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-latest'
  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. run: |
  40. # Adding [sdl-ci-filter GLOB] to the commit message will limit the jobs
  41. # e.g. [sdl-ci-filter msvc-*]
  42. EOF=$(openssl rand -hex 32)
  43. cat >/tmp/commit_message.txt <<$EOF
  44. ${{ github.event.head_commit.message }}
  45. $EOF
  46. python .github/workflows/create-test-plan.py \
  47. ${{ (github.event_name != 'schedule' && '--priority-only') || '' }} \
  48. --github-variable-prefix platforms \
  49. --github-ci \
  50. --verbose \
  51. ${{ (github.repository_owner != 'libsdl-org' && '--no-artifact') || '' }} \
  52. --commit-message-file /tmp/commit_message.txt
  53. level1:
  54. needs: [controller]
  55. uses: './.github/workflows/generic.yml'
  56. with:
  57. platforms: ${{ needs.controller.outputs.platforms-level1 }}
  58. level2:
  59. needs: [controller, level1]
  60. uses: './.github/workflows/generic.yml'
  61. with:
  62. platforms: ${{ needs.controller.outputs.platforms-others }}