web_builds.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: 🌐 Web Builds
  2. on:
  3. workflow_call:
  4. # Global Settings
  5. env:
  6. # Used for the cache key. Add version suffix to force clean build.
  7. GODOT_BASE_BRANCH: master
  8. SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no use_closure_compiler=yes strict_checks=yes
  9. EM_VERSION: 3.1.64
  10. concurrency:
  11. group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-web
  12. cancel-in-progress: true
  13. jobs:
  14. web-template:
  15. runs-on: ubuntu-24.04
  16. name: ${{ matrix.name }}
  17. strategy:
  18. fail-fast: false
  19. matrix:
  20. include:
  21. - name: Template w/ threads (target=template_release, threads=yes)
  22. cache-name: web-template
  23. target: template_release
  24. sconsflags: threads=yes
  25. tests: false
  26. artifact: true
  27. - name: Template w/o threads (target=template_release, threads=no)
  28. cache-name: web-nothreads-template
  29. target: template_release
  30. sconsflags: threads=no
  31. tests: false
  32. artifact: true
  33. steps:
  34. - name: Checkout
  35. uses: actions/checkout@v4
  36. with:
  37. submodules: recursive
  38. - name: Set up Emscripten latest
  39. uses: mymindstorm/setup-emsdk@v14
  40. with:
  41. version: ${{ env.EM_VERSION }}
  42. no-cache: true
  43. - name: Verify Emscripten setup
  44. run: |
  45. emcc -v
  46. - name: Restore Godot build cache
  47. uses: ./.github/actions/godot-cache-restore
  48. with:
  49. cache-name: ${{ matrix.cache-name }}
  50. continue-on-error: true
  51. - name: Setup Python and SCons
  52. uses: ./.github/actions/godot-deps
  53. - name: Compilation
  54. uses: ./.github/actions/godot-build
  55. with:
  56. sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
  57. platform: web
  58. target: ${{ matrix.target }}
  59. tests: ${{ matrix.tests }}
  60. - name: Save Godot build cache
  61. uses: ./.github/actions/godot-cache-save
  62. with:
  63. cache-name: ${{ matrix.cache-name }}
  64. continue-on-error: true
  65. - name: Upload artifact
  66. uses: ./.github/actions/upload-artifact
  67. if: matrix.artifact
  68. with:
  69. name: ${{ matrix.cache-name }}