From 3d41dc16d9e97a43fedc90c49d42212a5a88f689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 15 May 2019 13:44:03 +0200 Subject: [PATCH] ci: Use Ninja on AppVeyor --- appveyor.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 76e2cbd..68319fa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,5 @@ version: "{build}" +image: Visual Studio 2017 branches: only: - master @@ -9,28 +10,23 @@ configuration: - Release environment: matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - GENERATOR: "Visual Studio 15 2017 Win64" - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - GENERATOR: "Visual Studio 14 2015 Win64" - + - VS: 2015 + - VS: 2017 - GO: true cache: - C:\.hunter\_Base\Cache -> cmake\Hunter\init.cmake before_build: -- ps: >- - if ($env:GENERATOR) { - if (!(test-path build)) { mkdir build } - cd build - cmake -Wno-dev -G "$env:GENERATOR" .. -DTOOLCHAIN=cxx17-pic -DEVMC_TESTING=ON -DCMAKE_INSTALL_PREFIX=C:\install - } + # Add ninja to PATH. This is done for VS2017 by vsdevcmd, but not for VS2015. + - set PATH=%PATH%;%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja + - if "%VS%" == "2017" (call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=amd64) + - if "%VS%" == "2015" (call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall" x64) + - if defined VS cmake -S . -B build -G Ninja -Wno-dev -DCMAKE_INSTALL_PREFIX=C:\install -DTOOLCHAIN=cxx17-pic -DEVMC_TESTING=ON build_script: - ps: >- - if ($env:GENERATOR) { - cmake --build . --config $env:CONFIGURATION --target install + if ($env:VS) { + cmake --build build --target install } elseif ($env:GO) { $env:PATH = "C:\msys64\mingw64\bin;$env:PATH" @@ -53,6 +49,7 @@ build_script: after_build: - ps: >- - if ($env:GENERATOR) { + if ($env:VS) { + cd build ctest -C $env:CONFIGURATION -j4 --schedule-random --output-on-failure }