Skip to content

Commit 558e224

Browse files
committed
ci: Treat warnings as errors for 32bit windows.
Also bumps warning level to /W4 and silences warnings at that level that haven't been fixed yet.
1 parent 2cb7eaa commit 558e224

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/openw3d.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,26 @@ jobs:
2020
include:
2121
- name: MSVC x86
2222
os: windows-latest
23-
cmake-args: -A Win32
23+
cmake-args: -GNinja -DCMAKE_BUILD_TYPE=Release
2424
shell: pwsh
25+
arch: x86
26+
options: "/W4;/WX;/wd4456;/wd4702;/wd4100;/wd4505;/wd4389;/wd5054;/wd4840"
2527
- name: MSVC x64
2628
os: windows-latest
27-
cmake-args: -A x64
29+
cmake-args: -GNinja -DCMAKE_BUILD_TYPE=Release
2830
shell: pwsh
31+
arch: x64
2932
- name: MinGW x86
3033
os: windows-latest
31-
cmake-args: -DW3D_BUILD_OPTION_FFMPEG=ON -GNinja
34+
cmake-args: -DW3D_BUILD_OPTION_FFMPEG=ON -GNinja -DCMAKE_BUILD_TYPE=Release
3235
build-args: --target combat combate renegade renegadeserver ww3d2e wwaudioe wwphyse
3336
msys2: true
3437
msys2-msystem: mingw32
3538
msys2-env: mingw-w64-i686
3639
shell: msys2 {0}
3740
- name: MinGW x64
3841
os: windows-latest
39-
cmake-args: -DW3D_BUILD_OPTION_FFMPEG=ON -GNinja
42+
cmake-args: -DW3D_BUILD_OPTION_FFMPEG=ON -GNinja -DCMAKE_BUILD_TYPE=Release
4043
build-args: --target combat combate renegade renegadeserver ww3d2e wwaudioe wwphyse
4144
msys2: true
4245
msys2-msystem: mingw64
@@ -70,8 +73,15 @@ jobs:
7073
${{ matrix.msys2-env }}-ffmpeg
7174
${{ matrix.msys2-env }}-ninja
7275
${{ matrix.msys2-env }}-pkg-config
76+
- name: 'Set up MSVC dev cmd'
77+
if: ${{ !matrix.msys2 }}
78+
uses: ilammy/msvc-dev-cmd@v1.13.0
79+
with:
80+
arch: ${{ matrix.arch }}
7381
- uses: actions/checkout@v5
7482
- name: 'CMake (configure)'
83+
env:
84+
W3D_COMPILER_FLAGS: ${{ matrix.options }}
7585
run: |
7686
cmake -S . -B build ${{ matrix.cmake-args }}
7787
- name: 'CMake (build)'

0 commit comments

Comments
 (0)