Debian Codegraph @

.github/workflows/windows_builds.yml

raw symbols SCIP
1 name: 🏁 Windows Builds
2 on:
3 workflow_call:
4 workflow_dispatch:
5
6 # Global Settings
7 env:
8 SCONS_FLAGS: >-
9 dev_mode=yes
10 module_text_server_fb_enabled=yes
11 debug_symbols=no
12 "angle_libs=${{ github.workspace }}/"
13 "accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.21.2/"
14 SCONS_CACHE_MSVC_CONFIG: true
15 PYTHONIOENCODING: utf8
16
17 jobs:
18 build-windows:
19 # Windows 10 with latest image
20 runs-on: windows-latest
21 name: ${{ matrix.name }}
22 timeout-minutes: 120
23 strategy:
24 fail-fast: false
25 matrix:
26 include:
27 - name: Editor (target=editor)
28 cache-name: windows-editor
29 target: editor
30 scons-flags: >-
31 windows_subsystem=console
32 vsproj=yes
33 vsproj_gen_only=no
34 bin: ./bin/godot.windows.editor.x86_64.exe
35 compiler: msvc
36
37 - name: Editor w/ clang-cl (target=editor, use_llvm=yes)
38 cache-name: windows-editor-clang
39 target: editor
40 scons-flags: >-
41 windows_subsystem=console
42 use_llvm=yes
43 bin: ./bin/godot.windows.editor.x86_64.llvm.exe
44 compiler: clang
45
46 - name: Template (target=template_release)
47 cache-name: windows-template
48 target: template_release
49 bin: ./bin/godot.windows.template_release.x86_64.console.exe
50 compiler: msvc
51
52 - name: Template w/ GCC (target=template_release, use_mingw=yes)
53 cache-name: windows-template-gcc
54 # MinGW takes MUCH longer to compile; save time by only targeting Template.
55 target: template_release
56 scons-flags: use_mingw=yes
57 bin: ./bin/godot.windows.template_release.x86_64.console.exe
58 compiler: gcc
59
60 steps:
61 - name: Checkout
62 uses: actions/checkout@v6
63 with:
64 submodules: recursive
65
66 - name: Restore Godot build cache
67 uses: ./.github/actions/godot-cache-restore
68 with:
69 cache-name: ${{ matrix.cache-name }}
70 continue-on-error: true
71
72 - name: Setup Python and SCons
73 uses: ./.github/actions/godot-deps
74
75 - name: Download Direct3D 12 SDK components
76 shell: sh
77 id: d3d12-sdk
78 run: |
79 if python ./misc/scripts/install_d3d12_sdk_windows.py; then
80 echo "D3D12_ENABLED=yes" >> "$GITHUB_OUTPUT"
81 else
82 echo "::warning::Windows: Direct3D 12 SDK installation failed, building without Direct3D 12 support."
83 echo "D3D12_ENABLED=no" >> "$GITHUB_OUTPUT"
84 fi
85 continue-on-error: true
86
87 - name: Download pre-built ANGLE static libraries
88 uses: dsaltares/[email protected]
89 with:
90 repo: godotengine/godot-angle-static
91 version: tags/chromium/6601.2
92 file: godot-angle-static-x86_64-${{ matrix.compiler == 'gcc' && 'gcc' || 'msvc' }}-release.zip
93 target: angle/angle.zip
94
95 - name: Extract pre-built ANGLE static libraries
96 run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/
97
98 - name: Download pre-built AccessKit
99 uses: dsaltares/[email protected]
100 with:
101 repo: godotengine/godot-accesskit-c-static
102 version: tags/0.21.2
103 file: accesskit-c-0.21.2.zip
104 target: accesskit-c-0.21.2/accesskit_c.zip
105
106 - name: Extract pre-built AccessKit
107 run: unzip -o accesskit-c-0.21.2/accesskit_c.zip
108
109 - name: Compilation
110 uses: ./.github/actions/godot-build
111 with:
112 scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }} d3d12=${{ steps.d3d12-sdk.outputs.D3D12_ENABLED }}
113 platform: windows
114 target: ${{ matrix.target }}
115
116 - name: Save Godot build cache
117 uses: ./.github/actions/godot-cache-save
118 with:
119 cache-name: ${{ matrix.cache-name }}
120 continue-on-error: true
121
122 - name: Prepare artifact
123 if: matrix.compiler == 'msvc'
124 run: |
125 Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
126
127 - name: Upload artifact
128 if: matrix.compiler == 'msvc'
129 uses: ./.github/actions/upload-artifact
130 with:
131 name: ${{ matrix.cache-name }}
132
133 - name: Unit tests
134 run: |
135 ${{ matrix.bin }} --version
136 ${{ matrix.bin }} --help
137 ${{ matrix.bin }} --test --force-colors