windows_builds.yml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. name: 🏁 Windows Builds
  2. on:
  3. workflow_call:
  4. # Global Settings
  5. # SCONS_CACHE for windows must be set in the build environment
  6. env:
  7. # Used for the cache key. Add version suffix to force clean build.
  8. GODOT_BASE_BRANCH: master
  9. SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes d3d12=yes strict_checks=yes "angle_libs=${{ github.workspace }}/"
  10. SCONS_CACHE_MSVC_CONFIG: true
  11. jobs:
  12. build-windows:
  13. # Windows 10 with latest image
  14. runs-on: windows-latest
  15. name: ${{ matrix.name }}
  16. timeout-minutes: 120
  17. strategy:
  18. fail-fast: false
  19. matrix:
  20. include:
  21. - name: Editor (target=editor, tests=yes)
  22. cache-name: windows-editor
  23. target: editor
  24. tests: true
  25. # Skip debug symbols, they're way too big with MSVC.
  26. sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
  27. bin: ./bin/godot.windows.editor.x86_64.exe
  28. compiler: msvc
  29. cache-limit: 2
  30. - name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)
  31. cache-name: windows-editor-clang
  32. target: editor
  33. tests: true
  34. sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
  35. bin: ./bin/godot.windows.editor.x86_64.llvm.exe
  36. compiler: clang
  37. cache-limit: 1
  38. - name: Template (target=template_release, tests=yes)
  39. cache-name: windows-template
  40. target: template_release
  41. tests: true
  42. sconsflags: debug_symbols=no
  43. bin: ./bin/godot.windows.template_release.x86_64.console.exe
  44. compiler: msvc
  45. cache-limit: 2
  46. - name: Template w/ GCC (target=template_release, tests=yes, use_mingw=yes)
  47. cache-name: windows-template-gcc
  48. # MinGW takes MUCH longer to compile; save time by only targeting Template.
  49. target: template_release
  50. tests: true
  51. sconsflags: debug_symbols=no use_mingw=yes
  52. bin: ./bin/godot.windows.template_release.x86_64.console.exe
  53. compiler: gcc
  54. cache-limit: 1
  55. steps:
  56. - name: Checkout
  57. uses: actions/checkout@v4
  58. with:
  59. submodules: recursive
  60. - name: Restore Godot build cache
  61. uses: ./.github/actions/godot-cache-restore
  62. with:
  63. cache-name: ${{ matrix.cache-name }}
  64. continue-on-error: true
  65. - name: Setup Python and SCons
  66. uses: ./.github/actions/godot-deps
  67. - name: Download Direct3D 12 SDK components
  68. run: python ./misc/scripts/install_d3d12_sdk_windows.py
  69. - name: Download pre-built ANGLE static libraries
  70. uses: dsaltares/fetch-gh-release-asset@1.1.2
  71. with:
  72. repo: godotengine/godot-angle-static
  73. version: tags/chromium/6601.2
  74. file: godot-angle-static-x86_64-${{ matrix.compiler == 'gcc' && 'gcc' || 'msvc' }}-release.zip
  75. target: angle/angle.zip
  76. - name: Extract pre-built ANGLE static libraries
  77. run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/
  78. - name: Compilation
  79. uses: ./.github/actions/godot-build
  80. with:
  81. sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
  82. platform: windows
  83. target: ${{ matrix.target }}
  84. tests: ${{ matrix.tests }}
  85. scons-cache-limit: ${{ matrix.cache-limit }}
  86. - name: Save Godot build cache
  87. uses: ./.github/actions/godot-cache-save
  88. with:
  89. cache-name: ${{ matrix.cache-name }}
  90. continue-on-error: true
  91. - name: Prepare artifact
  92. if: matrix.compiler == 'msvc'
  93. run: |
  94. Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
  95. - name: Upload artifact
  96. if: matrix.compiler == 'msvc'
  97. uses: ./.github/actions/upload-artifact
  98. with:
  99. name: ${{ matrix.cache-name }}
  100. - name: Unit tests
  101. if: matrix.tests
  102. run: |
  103. ${{ matrix.bin }} --version
  104. ${{ matrix.bin }} --help
  105. ${{ matrix.bin }} --test --force-colors