windows_builds.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. concurrency:
  12. group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-windows
  13. cancel-in-progress: true
  14. jobs:
  15. build-windows:
  16. # Windows 10 with latest image
  17. runs-on: windows-latest
  18. name: ${{ matrix.name }}
  19. strategy:
  20. fail-fast: false
  21. matrix:
  22. include:
  23. - name: Editor (target=editor, tests=yes)
  24. cache-name: windows-editor
  25. target: editor
  26. tests: true
  27. # Skip debug symbols, they're way too big with MSVC.
  28. sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
  29. bin: ./bin/godot.windows.editor.x86_64.exe
  30. compiler: msvc
  31. - name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)
  32. cache-name: windows-editor-clang
  33. target: editor
  34. tests: true
  35. sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
  36. bin: ./bin/godot.windows.editor.x86_64.llvm.exe
  37. compiler: clang
  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. - name: Template w/ GCC (target=template_release, tests=yes, use_mingw=yes)
  46. cache-name: windows-template-gcc
  47. # MinGW takes MUCH longer to compile; save time by only targeting Template.
  48. target: template_release
  49. tests: true
  50. sconsflags: debug_symbols=no use_mingw=yes
  51. bin: ./bin/godot.windows.template_release.x86_64.console.exe
  52. compiler: gcc
  53. steps:
  54. - name: Checkout
  55. uses: actions/checkout@v4
  56. with:
  57. submodules: recursive
  58. - name: Restore Godot build cache
  59. uses: ./.github/actions/godot-cache-restore
  60. with:
  61. cache-name: ${{ matrix.cache-name }}
  62. continue-on-error: true
  63. - name: Setup Python and SCons
  64. uses: ./.github/actions/godot-deps
  65. - name: Download Direct3D 12 SDK components
  66. run: python ./misc/scripts/install_d3d12_sdk_windows.py
  67. - name: Download pre-built ANGLE static libraries
  68. uses: dsaltares/fetch-gh-release-asset@1.1.2
  69. with:
  70. repo: godotengine/godot-angle-static
  71. version: tags/chromium/6601.2
  72. file: godot-angle-static-x86_64-${{ matrix.compiler == 'gcc' && 'gcc' || 'msvc' }}-release.zip
  73. target: angle/angle.zip
  74. - name: Extract pre-built ANGLE static libraries
  75. run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/
  76. - name: Setup MSVC problem matcher
  77. if: matrix.compiler == 'msvc'
  78. uses: ammaraskar/msvc-problem-matcher@master
  79. - name: Setup GCC problem matcher
  80. if: matrix.compiler != 'msvc'
  81. uses: ammaraskar/gcc-problem-matcher@master
  82. - name: Compilation
  83. uses: ./.github/actions/godot-build
  84. with:
  85. sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
  86. platform: windows
  87. target: ${{ matrix.target }}
  88. tests: ${{ matrix.tests }}
  89. - name: Save Godot build cache
  90. uses: ./.github/actions/godot-cache-save
  91. with:
  92. cache-name: ${{ matrix.cache-name }}
  93. continue-on-error: true
  94. - name: Prepare artifact
  95. if: matrix.compiler == 'msvc'
  96. run: |
  97. Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
  98. - name: Upload artifact
  99. if: matrix.compiler == 'msvc'
  100. uses: ./.github/actions/upload-artifact
  101. with:
  102. name: ${{ matrix.cache-name }}
  103. - name: Unit tests
  104. if: matrix.tests
  105. run: |
  106. ${{ matrix.bin }} --version
  107. ${{ matrix.bin }} --help
  108. ${{ matrix.bin }} --test --force-colors