Skip to content

Commit

Permalink
CI: Expand GHA logic for windows compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
Repiteo committed Sep 20, 2024
1 parent 0a4aedb commit 10b32a1
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes d3d12=yes strict_checks=yes "angle_libs=${{ github.workspace }}/"
SCONSFLAGS: dev_mode=yes module_text_server_fb_enabled=yes d3d12=yes "angle_libs=${{ github.workspace }}/"
SCONS_CACHE_MSVC_CONFIG: true

concurrency:
Expand All @@ -21,31 +21,20 @@ jobs:
name: ${{ matrix.name }}
strategy:
fail-fast: false
compiler: [msvc, gcc, clang]
matrix:
include:
- name: Editor (target=editor, tests=yes)
cache-name: windows-editor
target: editor
tests: true
# Skip debug symbols, they're way too big with MSVC.
sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
bin: ./bin/godot.windows.editor.x86_64.exe
artifact: true
sconsflags: debug_symbols=no vsproj_gen_only=no windows_subsystem=console

- name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)
cache-name: windows-editor-clang
target: editor
tests: true
sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
bin: ./bin/godot.windows.editor.x86_64.llvm.exe

- name: Template (target=template_release, tests=yes)
cache-name: windows-template
- cache-name: windows-template
target: template_release
tests: true
sconsflags: debug_symbols=no
bin: ./bin/godot.windows.template_release.x86_64.console.exe
artifact: true

steps:
- name: Checkout
Expand All @@ -56,7 +45,7 @@ jobs:
- name: Restore Godot build cache
uses: ./.github/actions/godot-cache-restore
with:
cache-name: ${{ matrix.cache-name }}
cache-name: ${{ matrix.cache-name }}-${{ matrix.compiler }}
continue-on-error: true

- name: Setup Python and SCons
Expand All @@ -77,36 +66,46 @@ jobs:
run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/

- name: Setup MSVC problem matcher
if: matrix.compiler == 'msvc'
uses: ammaraskar/msvc-problem-matcher@master

- name: Setup GCC problem matcher
if: matrix.compiler != 'msvc'
uses: ammaraskar/gcc-problem-matcher@maste

- name: Compilation
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
sconsflags: >-
${{ env.SCONSFLAGS }}
${{ matrix.sconsflags }}
vsproj=${{ matrix.compiler == 'msvc' && matrix.target == 'editor' }}
use_mingw=${{ matrix.compiler == 'gcc' }}
use_llvm=${{ matrix.compiler == 'clang' }}
platform: windows
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
with:
cache-name: ${{ matrix.cache-name }}
cache-name: ${{ matrix.cache-name }}-${{ matrix.compiler }}
continue-on-error: true

- name: Prepare artifact
if: ${{ matrix.artifact }}
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
- name: Upload artifact
if: ${{ matrix.artifact }}
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
name: ${{ matrix.cache-name }}-${{ matrix.compiler }}

- name: Unit tests
if: matrix.tests
env:
BIN: ./bin/godot.windows.${{ matrix.target }}.x86_64${{ matrix.compiler == 'clang' && '.llvm' || '' }}.exe
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --test --force-colors
${{ env.BIN }} --version
${{ env.BIN }} --help
${{ env.BIN }} --test --force-colors

0 comments on commit 10b32a1

Please sign in to comment.