| version: '{build}' | |
| # only build PRs and commits to develop branch | |
| # (see https://help.appveyor.com/discussions/questions/55079-two-builds-per-commit-to-pull-request) | |
| branches: | |
| only: | |
| - develop | |
| only_commits: | |
| files: | |
| - .github/external_ci/appveyor.yml | |
| - cmake/ | |
| - include/ | |
| - tests/ | |
| - CMakeLists.txt | |
| environment: | |
| matrix: | |
| # The Visual Studio 2017 jobs compile everything with /std:c++17, so they | |
| # only build the C++17 variant of each test, split into two jobs each to | |
| # stay below AppVeyor's 60-minute limit per job. The Visual Studio 2019 | |
| # job builds the tests for all standards and is split for the same reason. | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | |
| configuration: Debug | |
| platform: x86 | |
| CXX_FLAGS: "/W4 /WX" | |
| CMAKE_OPTIONS: "" | |
| GENERATOR: Visual Studio 14 2015 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | |
| configuration: Release | |
| platform: x86 | |
| CXX_FLAGS: "/W4 /WX" | |
| CMAKE_OPTIONS: "" | |
| GENERATOR: Visual Studio 14 2015 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | |
| configuration: Release | |
| platform: x86 | |
| CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX" | |
| CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=0/2" | |
| GENERATOR: Visual Studio 15 2017 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | |
| configuration: Release | |
| platform: x86 | |
| CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX" | |
| CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=1/2" | |
| GENERATOR: Visual Studio 15 2017 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | |
| configuration: Release | |
| platform: x86 | |
| CXX_FLAGS: "/W4 /WX" | |
| CMAKE_OPTIONS: "-DJSON_ImplicitConversions=OFF -DJSON_TestShard=0/2" | |
| GENERATOR: Visual Studio 16 2019 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | |
| configuration: Release | |
| platform: x86 | |
| CXX_FLAGS: "/W4 /WX" | |
| CMAKE_OPTIONS: "-DJSON_ImplicitConversions=OFF -DJSON_TestShard=1/2" | |
| GENERATOR: Visual Studio 16 2019 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | |
| configuration: Release | |
| platform: x64 | |
| CXX_FLAGS: "/W4 /WX" | |
| CMAKE_OPTIONS: "" | |
| GENERATOR: Visual Studio 14 2015 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | |
| configuration: Release | |
| platform: x64 | |
| CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX" | |
| CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=0/2" | |
| GENERATOR: Visual Studio 15 2017 | |
| - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | |
| configuration: Release | |
| platform: x64 | |
| CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX" | |
| CMAKE_OPTIONS: "-DJSON_TestStandards=17 -DJSON_TestShard=1/2" | |
| GENERATOR: Visual Studio 15 2017 | |
| init: | |
| - cmake --version | |
| - msbuild /version | |
| install: | |
| - if "%platform%"=="x86" set GENERATOR_PLATFORM=Win32 | |
| before_build: | |
| - cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin" -DJSON_BuildTests=On %CMAKE_OPTIONS% | |
| build_script: | |
| - cmake --build . --config "%configuration%" --parallel 2 | |
| test_script: | |
| - ctest -C "%configuration%" --parallel 2 --output-on-failure |