GSL/appveyor.yml

83 lines
2.3 KiB
YAML

shallow_clone: true
platform:
- x86
- x64
configuration:
- Debug
- Release
image:
- Visual Studio 2015
- Visual Studio 2017
environment:
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
install:
- ps: |
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"
}
before_build:
- ps: |
mkdir build
cd build
if ("$env:APPVEYOR_JOB_NAME" -match "Image: Visual Studio 2015") {
$env:generator="Visual Studio 14 2015"
} else {
$env:generator="Visual Studio 15 2017"
}
if ($env:PLATFORM -eq "x64") {
$env:generator="$env:generator Win64"
}
echo generator="$env:generator"
if ($env:USE_TOOLSET -eq "LLVM") {
$LINKER = "lld-link"
# Workaround for lld bug with vcpkg integration
if ((Get-Content C:\Tools\vcpkg\toolsrc\VERSION.txt).Replace('.','').Trim('"') -lt 20181020) {
echo "Fallback to MSVC linker."
cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM% && PATH > path.txt'
$env:PATH = Get-Content .\path.txt
$LINKER = "link"
} else { echo "==> vcpkg has been updated, please remove the workaround from appvayor.yml." }
# /Workaround
clang-cl --version
cmake .. -G "$env:generator" -T llvm -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_LINKER=$LINKER
}
else {
cmake .. -G "$env:generator" -DGSL_CXX_STANDARD="$env:GSL_CXX_STANDARD"
}
build_script:
- cmake --build . --config %CONFIGURATION% -- /m /v:minimal
test_script:
- ctest -j2
deploy: off