Просмотр исходного кода

CI: Add MSVC extra warnings build and correct labels of other extra warnings builds.

Rokas Kupstys 5 лет назад
Родитель
Сommit
7a22767483
2 измененных файлов с 10 добавлено и 3 удалено
  1. 9 2
      .github/workflows/build.yml
  2. 1 1
      examples/example_null/build_win32.bat

+ 9 - 2
.github/workflows/build.yml

@@ -10,6 +10,7 @@ jobs:
   Windows:
     runs-on: windows-2019
     env:
+      VS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
       MSBUILD_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\
       # Until gh-actions allow us to use env variables inside other env variables (because we need %GITHUB_WORKSPACE%) we have to use relative path to imgui/examples/example_name directory.
       SDL2_DIR: ..\..\SDL2-devel-2.0.10-VC\SDL2-2.0.10\
@@ -41,9 +42,15 @@ jobs:
           }
 
       # Not using matrix here because it would inflate job count too much. Check out and setup is done for every job and that makes build times way too long.
-      - name: Build example_null (extra warnings)
+      - name: Build example_null (extra warnings, mingw 64-bit)
         run: mingw32-make -C examples/example_null EXTRA_WARNINGS=1
 
+      - name: Build example_null (extra warnings, msvc 64-bit)
+        shell: cmd
+        run: |
+          cd examples\example_null
+          "%VS_PATH%\VC\Auxiliary\Build\vcvarsall.bat" x64 && .\build_win32.bat /W4
+
       - name: Build example_null (single file build)
         shell: bash
         run: |
@@ -214,7 +221,7 @@ jobs:
         brew install glfw3
         brew install sdl2
 
-    - name: Build example_null (extra warnings)
+    - name: Build example_null (extra warnings, clang 64-bit)
       run: make -C examples/example_null EXTRA_WARNINGS=1
 
     - name: Build example_null (single file build)

+ 1 - 1
examples/example_null/build_win32.bat

@@ -1,3 +1,3 @@
 @REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
 mkdir Debug
-cl /nologo /Zi /MD /I ..\.. *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib
+cl /nologo /Zi /MD /I ..\.. %* *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib