build.yml 1.5 KB

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