From f4168086511bd41e5835653dfe1ad35521af81ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 7 Feb 2020 11:41:27 +0100 Subject: [PATCH] package/ci: add a 32-bit MSVC build. --- package/ci/appveyor-desktop.bat | 18 ++++++++++++------ package/ci/appveyor.yml | 28 ++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/package/ci/appveyor-desktop.bat b/package/ci/appveyor-desktop.bat index 3300045aa..70fbf6a24 100644 --- a/package/ci/appveyor-desktop.bat +++ b/package/ci/appveyor-desktop.bat @@ -1,7 +1,13 @@ -if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat" x64 || exit /b -if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvarsall.bat" x64 || exit /b -if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" call "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" x64 || exit /b -set PATH=%APPVEYOR_BUILD_FOLDER%/openal/bin/Win64;%APPVEYOR_BUILD_FOLDER%\deps\bin;%PATH% +if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvarsall.bat" %PLATFORM% || exit /b +if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" call "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvarsall.bat" %PLATFORM% || exit /b +if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2015" call "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat" %PLATFORM% || exit /b +set PATH=%APPVEYOR_BUILD_FOLDER%\deps\bin;%PATH% +if "%PLATFORM%" == "" set PATH=%APPVEYOR_BUILD_FOLDER%/openal/bin/Win32;%PATH% +rem for SOME FREAKING REASON vcvarsall.bat in MSVC2015 sets %PLATFORM% to +rem X64 while I expect it to be x64. With a 32-bit build it fortunately stays +rem empty. Not a problem on 2017 or 2019. So doing a case-insensitive compare +rem here to make things work properly. +if /I "%PLATFORM%" == "x64" set PATH=%APPVEYOR_BUILD_FOLDER%/openal/bin/Win64;%PATH% rem need to explicitly specify a 64-bit target, otherwise CMake+Ninja can't rem figure that out -- https://gitlab.kitware.com/cmake/cmake/issues/16259 @@ -14,7 +20,7 @@ git clone --depth 1 git://github.com/mosra/corrade.git || exit /b cd corrade || exit /b mkdir build && cd build || exit /b cmake .. ^ - -DCMAKE_BUILD_TYPE=Debug ^ + -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^ -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^ -DWITH_INTERCONNECT=OFF ^ -DUTILITY_USE_ANSI_COLORS=ON ^ @@ -27,7 +33,7 @@ cd .. && cd .. rem Build mkdir build && cd build || exit /b cmake .. ^ - -DCMAKE_BUILD_TYPE=Debug ^ + -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^ -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^ -DCMAKE_PREFIX_PATH="%APPVEYOR_BUILD_FOLDER%/SDL;%APPVEYOR_BUILD_FOLDER%/openal" ^ -DWITH_AUDIO=ON ^ diff --git a/package/ci/appveyor.yml b/package/ci/appveyor.yml index 92ab221e7..a5e1baf5f 100644 --- a/package/ci/appveyor.yml +++ b/package/ci/appveyor.yml @@ -4,29 +4,50 @@ environment: matrix: - TARGET: desktop COMPILER: msvc + PLATFORM: x64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 APPVEYOR_JOB_NAME: windows-gl-msvc2015 + CONFIGURATION: Debug - TARGET: desktop COMPILER: msvc + PLATFORM: x64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 APPVEYOR_JOB_NAME: windows-gl-msvc2017 + CONFIGURATION: Debug - TARGET: desktop COMPILER: msvc + PLATFORM: x64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 APPVEYOR_JOB_NAME: windows-gl-msvc2019 + CONFIGURATION: Debug - TARGET: desktop-vulkan COMPILER: msvc + PLATFORM: x64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 APPVEYOR_JOB_NAME: windows-vulkan-msvc2019 + CONFIGURATION: Debug - TARGET: desktop COMPILER: msvc + PLATFORM: x64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 APPVEYOR_JOB_NAME: windows-static-msvc2019 + CONFIGURATION: Debug BUILD_STATIC: ON - TARGET: desktop COMPILER: msvc-clang + PLATFORM: x64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 APPVEYOR_JOB_NAME: windows-msvc2019-clang + CONFIGURATION: Debug + # Build at least one 32bit Release build, so we catch things that are not a + # problem on either 64bit or Debug. + - TARGET: desktop + COMPILER: msvc + ANSI_COLORS: ON + PLATFORM: + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + APPVEYOR_JOB_NAME: windows-32b-msvc2015 + CONFIGURATION: Release - TARGET: desktop COMPILER: mingw APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 @@ -80,6 +101,7 @@ install: - IF NOT "%TARGET%" == "rt" IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\openal-soft-1.19.1-bin.zip appveyor DownloadFile https://openal-soft.org/openal-binaries/openal-soft-1.19.1-bin.zip - IF NOT "%TARGET%" == "rt" 7z x openal-soft-1.19.1-bin.zip && ren openal-soft-1.19.1-bin openal && echo [General] > %APPDATA%/alsoft.ini & echo drivers=null >> %APPDATA%/alsoft.ini - IF "%TARGET%" == "desktop" ren openal\bin\Win64\soft_oal.dll OpenAL32.dll +- IF "%TARGET%" == "desktop" ren openal\bin\Win32\soft_oal.dll OpenAL32.dll - IF "%TARGET%" == "desktop-gles" ren openal\bin\Win64\soft_oal.dll OpenAL32.dll # Build apps on both GL and Vulkan to verify these can build w/o GL as well. @@ -95,8 +117,10 @@ install: - IF "%BUILD_APPLICATIONS%" == "YES" IF "%COMPILER%" == "mingw" 7z x SDL2-devel-2.0.9-mingw.tar.gz & 7z x SDL2-devel-2.0.9-mingw.tar & ren SDL2-2.0.9 SDL # GLFW -- IF "%BUILD_APPLICATIONS%" == "YES" IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\glfw-3.2.1.bin.WIN64.zip appveyor DownloadFile https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN64.zip -- IF "%BUILD_APPLICATIONS%" == "YES" 7z x glfw-3.2.1.bin.WIN64.zip && ren glfw-3.2.1.bin.WIN64 glfw && mkdir deps && mkdir deps\lib && mkdir deps\bin && mkdir deps\include && xcopy /e glfw\include\* deps\include\ +- IF "%BUILD_APPLICATIONS%" == "YES" IF "%PLATFORM%" == "" IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\glfw-3.2.1.bin.WIN32.zip appveyor DownloadFile https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN32.zip +- IF "%BUILD_APPLICATIONS%" == "YES" IF "%PLATFORM%" == "x64" IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\glfw-3.2.1.bin.WIN64.zip appveyor DownloadFile https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN64.zip +- IF "%BUILD_APPLICATIONS%" == "YES" IF "%PLATFORM%" == "" 7z x glfw-3.2.1.bin.WIN32.zip && ren glfw-3.2.1.bin.WIN32 glfw && mkdir deps && mkdir deps\lib && mkdir deps\bin && mkdir deps\include && xcopy /e glfw\include\* deps\include\ +- IF "%BUILD_APPLICATIONS%" == "YES" IF "%PLATFORM%" == "x64" 7z x glfw-3.2.1.bin.WIN64.zip && ren glfw-3.2.1.bin.WIN64 glfw && mkdir deps && mkdir deps\lib && mkdir deps\bin && mkdir deps\include && xcopy /e glfw\include\* deps\include\ - IF "%BUILD_APPLICATIONS%" == "YES" IF "%COMPILER:~0,4%" == "msvc" copy glfw\lib-vc2015\glfw3.dll deps\bin\ && copy glfw\lib-vc2015\glfw3dll.lib deps\lib\glfw3.lib - IF "%BUILD_APPLICATIONS%" == "YES" IF "%COMPILER%" == "mingw" copy glfw\lib-mingw-w64\glfw3.dll deps\bin\ && copy glfw\lib-mingw-w64\libglfw3dll.a deps\lib\libglfw3.a