shallow_clone: true platform: - x86 - x64 configuration: - Debug - Release image: - Visual Studio 2015 - Visual Studio 2017 environment: NINJA_TAG: v1.8.2 NINJA_SHA512: 9B9CE248240665FCD6404B989F3B3C27ED9682838225E6DC9B67B551774F251E4FF8A207504F941E7C811E7A8BE1945E7BCB94472A335EF15E23A0200A32E6D5 NINJA_PATH: C:\Tools\ninja\ninja-%NINJA_TAG% VCVAR2015: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' VCVAR2017: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat' matrix: - GSL_CXX_STANDARD: 14 USE_TOOLSET: MSVC - GSL_CXX_STANDARD: 17 USE_TOOLSET: MSVC - GSL_CXX_STANDARD: 14 USE_TOOLSET: LLVM - GSL_CXX_STANDARD: 17 USE_TOOLSET: LLVM matrix: exclude: - image: Visual Studio 2015 GSL_CXX_STANDARD: 17 - image: Visual Studio 2015 USE_TOOLSET: LLVM cache: - C:\cmake-3.8.0-win32-x86 - C:\Tools\ninja install: - ps: | if (![IO.File]::Exists("$env:NINJA_PATH\ninja.exe")) { Start-FileDownload ` "https://github.com/ninja-build/ninja/releases/download/$env:NINJA_TAG/ninja-win.zip" $hash = (Get-FileHash ninja-win.zip -Algorithm SHA512).Hash if ($env:NINJA_SHA512 -eq $hash) { 7z e -y ninja-win.zip -o"$env:NINJA_PATH" } else { Write-Warning "Ninja download hash changed!"; Write-Output "$hash" } } if ([IO.File]::Exists("$env:NINJA_PATH\ninja.exe")) { $env:PATH = "$env:NINJA_PATH;$env:PATH" } else { Write-Warning "Failed to find ninja.exe in expected location." } if ($env:USE_TOOLSET -ne "LLVM") { if (![IO.File]::Exists("C:\cmake-3.8.0-win32-x86\bin\cmake.exe")) { Start-FileDownload 'https://cmake.org/files/v3.8/cmake-3.8.0-win32-x86.zip' 7z x -y cmake-3.8.0-win32-x86.zip -oC:\ } $env:PATH="C:\cmake-3.8.0-win32-x86\bin;$env:PATH" } # Workaround for lld bug with vcpkg integration if ($env:USE_TOOLSET -eq "LLVM") { if ( (Get-Content C:\Tools\vcpkg\toolsrc\VERSION.txt).Replace('.','').Trim('"') -lt 20181020 ) { echo "Updating vcpkg..." cd C:\Tools\vcpkg git pull --quiet cd "$env:APPVEYOR_BUILD_FOLDER" } else { Write-Warning "vcpkg has been updated, please remove the workaround from appveyor.yml." } } before_build: - ps: | mkdir build > $NULL cd build if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") { $env:VCVARSALL = $env:VCVAR2015 } else { $env:VCVARSALL = $env:VCVAR2017 } $env:ARCHITECTURE = $env:PLATFORM if ("$env:USE_TOOLSET" -eq "LLVM") { $env:CC = "clang-cl" $env:CXX = "clang-cl" } elseif ("$env:USE_TOOLSET" -ne "MSVC") { Write-Warning "Configuration error: Invalid value for 'USE_TOOLSET'. Assume MSVC" } build_script: - call "%VCVARSALL%" %ARCHITECTURE% - cmake .. -G "Ninja" -DGSL_CXX_STANDARD="%GSL_CXX_STANDARD%" - cmake --build . --config %CONFIGURATION% test_script: - ctest -j2 deploy: off