From d63709895049b7b71c96dcd0a1e3e55abd4925c3 Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Wed, 17 Oct 2018 10:28:28 +0200 Subject: [PATCH] Add Appveyor CMake support (#109) --- .appveyor.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000000..78c27bc5848 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,44 @@ +# Use the Appveyor build number for naming the build. +# src: https://www.appveyor.com/docs/build-configuration/#build-versioning +version: '{build}' +shallow_clone: true + +platform: x64 + +environment: + matrix: +# CMake + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + VS: 2017 + CONFIG: Release + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + VS: 2017 + CONFIG: Debug + + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + VS: 2015 + CONFIG: Release + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + VS: 2015 + CONFIG: Debug + +matrix: + fast_finish: false + +before_build: + # see https://www.appveyor.com/docs/lang/cpp/#visual-studio-2017 + - if "%VS%"=="2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" + - if "%VS%"=="2017" set CMAKE_GENERATOR="Visual Studio 15 2017 Win64" + # see https://www.appveyor.com/docs/lang/cpp/#visual-studio-2015 + - if "%VS%"=="2015" call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 + - if "%VS%"=="2015" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 + - if "%VS%"=="2015" set CMAKE_GENERATOR="Visual Studio 14 2015 Win64" + +build_script: + - cmake --version + - cmake -H. -Bbuild -DABSL_RUN_TESTS=ON -DABSL_USE_GOOGLETEST_HEAD=ON -G %CMAKE_GENERATOR% + - cmake --build build --config %CONFIG% --target ALL_BUILD -- /maxcpucount + +test_script: + - set CTEST_OUTPUT_ON_FAILURE=1 && cmake --build build --config Release --target RUN_TESTS +