Browse Source

package/ci: add MSVC 2022 and /permissive- builds.

Dropping 2017 ES builds in exchange. Clang-cl doesn't work,
unfortunately, crashing with pybind11.
pull/15/head
Vladimír Vondruš 4 years ago
parent
commit
281c18fdeb
  1. 3
      package/ci/appveyor-desktop-gles.bat
  2. 18
      package/ci/appveyor-desktop.bat
  3. 82
      package/ci/appveyor.yml

3
package/ci/appveyor-desktop-gles.bat

@ -1,9 +1,10 @@
if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2022" call "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat" x64 || exit /b
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
set PATH=%APPVEYOR_BUILD_FOLDER%\deps\bin;%PATH%
rem Build pybind11. Downloaded in the appveyor.yml script.
cd pybind11-2.3.0 || exit /b
cd pybind11-%PYBIND% || exit /b
mkdir -p build && cd build || exit /b
cmake .. ^
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^

18
package/ci/appveyor-desktop.bat

@ -1,11 +1,19 @@
if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2022" call "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat" x64 || exit /b
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
rem SDL2 has the DLL in lib/x64, and in the static build it's imported so the
rem DLL has to be found.
set PATH=%APPVEYOR_BUILD_FOLDER%\deps\bin;%APPVEYOR_BUILD_FOLDER%\SDL\lib\x64;%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
rem for TestSuite we need to enable exceptions explicitly with /EH as these are
rem currently disabled -- https://github.com/catchorg/Catch2/issues/1113
if "%COMPILER%" == "msvc-clang" if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2022" set COMPILER_EXTRA=-DCMAKE_CXX_COMPILER="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/bin/lld-link.exe" -DCMAKE_CXX_FLAGS="-m64 /EHsc"
if "%COMPILER%" == "msvc-clang" if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" set COMPILER_EXTRA=-DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/bin/lld-link.exe" -DCMAKE_CXX_FLAGS="-m64 /EHsc"
rem Build pybind11. Downloaded in the appveyor.yml script.
cd pybind11-2.3.0 || exit /b
cd pybind11-%PYBIND% || exit /b
mkdir -p build && cd build || exit /b
cmake .. ^
-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/deps ^
@ -28,7 +36,7 @@ cmake .. ^
-DWITH_PLUGINMANAGER=ON ^
-DWITH_TESTSUITE=ON ^
-DUTILITY_USE_ANSI_COLORS=ON ^
-G Ninja || exit /b
%COMPILER_EXTRA% -G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b
cd .. && cd ..
@ -60,7 +68,7 @@ cmake .. ^
-DWITH_GLFWAPPLICATION=ON ^
-DWITH_WINDOWLESSWGLAPPLICATION=ON ^
-DWITH_ANYIMAGEIMPORTER=ON ^
-G Ninja || exit /b
%COMPILER_EXTRA% -G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b
cd .. && cd ..
@ -76,7 +84,7 @@ cmake .. ^
-DWITH_DDSIMPORTER=ON ^
-DWITH_STBIMAGEIMPORTER=ON ^
-DWITH_TINYGLTFIMPORTER=ON ^
-G Ninja || exit /b
%COMPILER_EXTRA% -G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b
cd .. && cd ..
@ -91,7 +99,7 @@ cmake .. ^
-DPYBIND11_PYTHON_VERSION=3.6 ^
-DWITH_PYTHON=ON ^
-DBUILD_TESTS=ON ^
-G Ninja || exit /b
%COMPILER_EXTRA% -G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b

82
package/ci/appveyor.yml

@ -7,37 +7,93 @@ environment:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
APPVEYOR_JOB_NAME: windows-msvc2017
PYTHON: 36
PYBIND: 2.3.0
- TARGET: desktop
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
APPVEYOR_JOB_NAME: windows-msvc2019
PYTHON: 36
PYBIND: 2.3.0
- TARGET: desktop
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
APPVEYOR_JOB_NAME: windows-msvc2022
PYTHON: 36
PYBIND: 2.9.0 # first supporting MSVC 2022
- TARGET: desktop
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
APPVEYOR_JOB_NAME: windows-static-msvc2019
BUILD_STATIC: ON
PYTHON: 36
- TARGET: desktop-gles
TARGET_GLES2: ON
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
APPVEYOR_JOB_NAME: windows-gles2-msvc2017
PYBIND: 2.3.0
- TARGET: desktop
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
APPVEYOR_JOB_NAME: windows-static-msvc2022
BUILD_STATIC: ON
PYTHON: 36
PYBIND: 2.9.0 # first supporting MSVC 2022
# clang-cl crashes with pybind11, "Illegal instruction" and
# lld-link: warning: ignoring unknown argument '-flto'
# LLVM ERROR: Associative COMDAT symbol '??0type_error@pybind11@@QEAA@PEBD@Z' does not exist.
# TODO: retry once their changelog says something about clang-cl being fixed
#- TARGET: desktop
#COMPILER: msvc-clang
#APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
#APPVEYOR_JOB_NAME: windows-msvc2019-clang
#PYTHON: 36
#PYBIND: 2.7.0
#- TARGET: desktop
#COMPILER: msvc-clang
#APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
#APPVEYOR_JOB_NAME: windows-msvc2022-clang
#PYTHON: 36
#PYBIND: 2.9.0 # first supporting MSVC 2022
- TARGET: desktop
COMPILER: msvc
# Same reasoning as in Corrade for /EHsc
COMPILER_EXTRA: -DCMAKE_CXX_FLAGS="/permissive- /EHsc" -DMSVC_COMPATIBILITY=OFF
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
APPVEYOR_JOB_NAME: windows-conforming-msvc2019
PYTHON: 36
PYBIND: 2.3.0
- TARGET: desktop
COMPILER: msvc
# Not playing with fire and using /EHsc on 2022 as well
COMPILER_EXTRA: -DCMAKE_CXX_FLAGS="/permissive- /EHsc" -DMSVC_COMPATIBILITY=OFF
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
APPVEYOR_JOB_NAME: windows-conforming-msvc2022
PYTHON: 36
PYBIND: 2.9.0 # first supporting MSVC 2022
- TARGET: desktop-gles
TARGET_GLES2: ON
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
APPVEYOR_JOB_NAME: windows-gles2-msvc2019
PYTHON: 36
PYBIND: 2.3.0
- TARGET: desktop-gles
TARGET_GLES2: OFF
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
APPVEYOR_JOB_NAME: windows-gles3-msvc2017
TARGET_GLES2: ON
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
APPVEYOR_JOB_NAME: windows-gles2-msvc2022
PYTHON: 36
PYBIND: 2.9.0 # first supporting MSVC 2022
- TARGET: desktop-gles
TARGET_GLES2: OFF
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
APPVEYOR_JOB_NAME: windows-gles3-msvc2019
PYTHON: 36
PYBIND: 2.3.0
- TARGET: desktop-gles
TARGET_GLES2: OFF
COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
APPVEYOR_JOB_NAME: windows-gles3-msvc2022
PYTHON: 36
PYBIND: 2.9.0 # first supporting MSVC 2022
install:
# Ninja. `cinst ninja` started 503ing in late November 2019 and wasn't really
@ -55,20 +111,20 @@ install:
- IF "%BUILD_STATIC%" == "ON" set "STATIC_PLUGIN_PATH=-DMAGNUM_PLUGINS_DIR=%APPVEYOR_BUILD_FOLDER:\=/%/deps/bin/magnum"
# pybind11. Built in the CI script.
- IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\v2.3.0.zip appveyor DownloadFile https://github.com/pybind/pybind11/archive/v2.3.0.zip
- 7z x v2.3.0.zip
- IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\v%PYBIND%.zip appveyor DownloadFile https://github.com/pybind/pybind11/archive/v%PYBIND%.zip
- 7z x v%PYBIND%.zip
# SDL2
- IF "%TARGET%" == "desktop" IF "%COMPILER%" == "msvc" IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\SDL2-devel-2.0.9-VC.zip appveyor DownloadFile http://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip
- IF "%TARGET%" == "desktop" IF "%COMPILER%" == "msvc" 7z x SDL2-devel-2.0.9-VC.zip && ren SDL2-2.0.9 SDL
- IF "%TARGET%" == "desktop" IF "%COMPILER:~0,4%" == "msvc" IF NOT EXIST %APPVEYOR_BUILD_FOLDER%\SDL2-devel-2.0.9-VC.zip appveyor DownloadFile http://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip
- IF "%TARGET%" == "desktop" IF "%COMPILER:~0,4%" == "msvc" 7z x SDL2-devel-2.0.9-VC.zip && ren SDL2-2.0.9 SDL
# GLFW
- IF "%TARGET%" == "desktop" 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 "%TARGET%" == "desktop" 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 "%TARGET%" == "desktop" IF "%COMPILER%" == "msvc" copy glfw\lib-vc2015\glfw3.dll deps\bin\ && copy glfw\lib-vc2015\glfw3dll.lib deps\lib\glfw3.lib
- IF "%TARGET%" == "desktop" IF "%COMPILER:~0,4%" == "msvc" copy glfw\lib-vc2015\glfw3.dll deps\bin\ && copy glfw\lib-vc2015\glfw3dll.lib deps\lib\glfw3.lib
build_script:
- IF "%TARGET%" == "desktop" IF "%COMPILER%" == "msvc" call package\ci\appveyor-desktop.bat
- IF "%TARGET%" == "desktop" IF "%COMPILER:~0,4%" == "msvc" call package\ci\appveyor-desktop.bat
- IF "%TARGET%" == "desktop-gles" call package\ci\appveyor-desktop-gles.bat
cache:

Loading…
Cancel
Save