build.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. concurrency:
  12. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
  13. cancel-in-progress: true
  14. jobs:
  15. controller:
  16. name: 'Create test plan'
  17. runs-on: 'ubuntu-latest'
  18. outputs:
  19. platforms-level1: ${{ steps.plan.outputs.platforms-level1 }}
  20. platforms-others: ${{ steps.plan.outputs.platforms-others }}
  21. steps:
  22. - uses: actions/setup-python@main
  23. with:
  24. python-version: 3.x
  25. - uses: actions/checkout@main
  26. with:
  27. sparse-checkout: '.github/workflows/create-test-plan.py'
  28. - name: 'Create plan'
  29. id: plan
  30. run: |
  31. # Adding [sdl-ci-filter GLOB] to the commit message will limit the jobs
  32. # e.g. [sdl-ci-filter msvc-*]
  33. EOF=$(openssl rand -hex 32)
  34. cat >/tmp/commit_message.txt <<$EOF
  35. ${{ github.event.head_commit.message }}
  36. $EOF
  37. python .github/workflows/create-test-plan.py \
  38. --github-variable-prefix platforms \
  39. --github-ci \
  40. --verbose \
  41. ${{ (github.repository_owner != 'libsdl-org' && '--no-artifact') || '' }} \
  42. --commit-message-file /tmp/commit_message.txt
  43. level1:
  44. needs: [controller]
  45. uses: './.github/workflows/generic.yml'
  46. with:
  47. platforms: ${{ needs.controller.outputs.platforms-level1 }}
  48. level2:
  49. needs: [controller, level1]
  50. uses: './.github/workflows/generic.yml'
  51. with:
  52. platforms: ${{ needs.controller.outputs.platforms-others }}