2017-04-02 15:24:42 -04:00
|
|
|
shallow_clone: true
|
|
|
|
|
|
|
|
platform:
|
|
|
|
- x86
|
|
|
|
- x64
|
|
|
|
|
|
|
|
configuration:
|
|
|
|
- Debug
|
|
|
|
- Release
|
|
|
|
|
|
|
|
image:
|
|
|
|
- Visual Studio 2015
|
|
|
|
- Visual Studio 2017
|
|
|
|
|
2018-06-15 13:13:11 -04:00
|
|
|
environment:
|
2018-11-17 16:26:33 -05:00
|
|
|
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'
|
2018-06-15 13:13:11 -04:00
|
|
|
matrix:
|
2018-11-16 13:27:35 -05:00
|
|
|
- GSL_CXX_STANDARD: 14
|
|
|
|
USE_TOOLSET: MSVC
|
|
|
|
- GSL_CXX_STANDARD: 17
|
|
|
|
USE_TOOLSET: MSVC
|
2018-11-16 11:34:14 -05:00
|
|
|
- GSL_CXX_STANDARD: 14
|
|
|
|
USE_TOOLSET: LLVM
|
2018-06-15 13:13:11 -04:00
|
|
|
- GSL_CXX_STANDARD: 17
|
2018-11-14 06:03:47 -05:00
|
|
|
USE_TOOLSET: LLVM
|
2018-06-15 13:13:11 -04:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
exclude:
|
|
|
|
- image: Visual Studio 2015
|
|
|
|
GSL_CXX_STANDARD: 17
|
2018-11-13 13:17:55 -05:00
|
|
|
- image: Visual Studio 2015
|
2018-11-14 06:03:47 -05:00
|
|
|
USE_TOOLSET: LLVM
|
2018-06-15 13:13:11 -04:00
|
|
|
|
2017-04-02 15:24:42 -04:00
|
|
|
cache:
|
2017-07-13 16:53:56 -04:00
|
|
|
- C:\cmake-3.8.0-win32-x86
|
2018-11-17 16:26:33 -05:00
|
|
|
- C:\Tools\ninja
|
2017-04-02 15:24:42 -04:00
|
|
|
|
|
|
|
install:
|
|
|
|
- ps: |
|
2018-11-17 16:26:33 -05:00
|
|
|
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." }
|
2018-11-15 13:55:17 -05:00
|
|
|
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"
|
2017-04-02 15:24:42 -04:00
|
|
|
}
|
2018-11-17 14:47:35 -05:00
|
|
|
# Workaround for lld bug with vcpkg integration
|
|
|
|
if ($env:USE_TOOLSET -eq "LLVM") {
|
|
|
|
if (
|
2018-11-17 14:51:36 -05:00
|
|
|
(Get-Content C:\Tools\vcpkg\toolsrc\VERSION.txt).Replace('.','').Trim('"') -lt 20181020
|
2018-11-17 14:47:35 -05:00
|
|
|
) {
|
|
|
|
echo "Updating vcpkg..."
|
|
|
|
cd C:\Tools\vcpkg
|
|
|
|
git pull --quiet
|
|
|
|
cd "$env:APPVEYOR_BUILD_FOLDER"
|
|
|
|
} else {
|
2018-11-17 16:26:33 -05:00
|
|
|
Write-Warning "vcpkg has been updated, please remove the workaround from appveyor.yml."
|
2018-11-17 14:47:35 -05:00
|
|
|
}
|
2018-11-17 07:01:54 -05:00
|
|
|
}
|
2017-04-02 15:24:42 -04:00
|
|
|
|
|
|
|
before_build:
|
|
|
|
- ps: |
|
2018-11-17 16:58:30 -05:00
|
|
|
mkdir build > $NULL
|
2017-04-02 15:24:42 -04:00
|
|
|
cd build
|
2018-11-17 16:26:33 -05:00
|
|
|
if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") {
|
|
|
|
$env:VCVARSALL = $env:VCVAR2015
|
2017-04-02 15:24:42 -04:00
|
|
|
} else {
|
2018-11-17 16:26:33 -05:00
|
|
|
$env:VCVARSALL = $env:VCVAR2017
|
2018-11-13 13:17:55 -05:00
|
|
|
}
|
2018-11-17 16:26:33 -05:00
|
|
|
$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"
|
2018-11-13 13:17:55 -05:00
|
|
|
}
|
2017-04-02 15:24:42 -04:00
|
|
|
|
|
|
|
build_script:
|
2018-11-17 16:26:33 -05:00
|
|
|
- call "%VCVARSALL%" %ARCHITECTURE%
|
|
|
|
- cmake .. -G "Ninja" -DGSL_CXX_STANDARD="%GSL_CXX_STANDARD%"
|
|
|
|
- cmake --build . --config %CONFIGURATION%
|
2017-04-02 15:24:42 -04:00
|
|
|
|
|
|
|
test_script:
|
|
|
|
- ctest -j2
|
|
|
|
|
|
|
|
deploy: off
|