From 7a22767483c4c6d0ea4d782c0bca4dbe0fc94776 Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Mon, 20 Jan 2020 15:57:39 +0200 Subject: [PATCH] CI: Add MSVC extra warnings build and correct labels of other extra warnings builds. --- .github/workflows/build.yml | 11 +++++++++-- examples/example_null/build_win32.bat | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 04f8f6dcc..a874bfff8 100644 --- a/.github/workflows/build.yml +++ b/.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) diff --git a/examples/example_null/build_win32.bat b/examples/example_null/build_win32.bat index 12cb70ab4..38e791481 100644 --- a/examples/example_null/build_win32.bat +++ b/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