mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Add Visual Studio 2019 image for tests (#787)
* Add Visual Studio 2019 image for tests Refer to https://github.com/appveyor/ci/issues/2907 VS2019 is enabled per request. * Use CMake 3.14 * Fix CMake output directory * trigger build * Trigger build
This commit is contained in:
parent
66809c6852
commit
1212beae77
20
appveyor.yml
20
appveyor.yml
@ -11,6 +11,7 @@ configuration:
|
|||||||
image:
|
image:
|
||||||
- Visual Studio 2015
|
- Visual Studio 2015
|
||||||
- Visual Studio 2017
|
- Visual Studio 2017
|
||||||
|
- Visual Studio 2019
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
NINJA_TAG: v1.8.2
|
NINJA_TAG: v1.8.2
|
||||||
@ -18,6 +19,7 @@ environment:
|
|||||||
NINJA_PATH: C:\Tools\ninja\ninja-%NINJA_TAG%
|
NINJA_PATH: C:\Tools\ninja\ninja-%NINJA_TAG%
|
||||||
VCVAR2015: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat'
|
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'
|
VCVAR2017: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
|
||||||
|
VCVAR2019: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat'
|
||||||
matrix:
|
matrix:
|
||||||
- GSL_CXX_STANDARD: 14
|
- GSL_CXX_STANDARD: 14
|
||||||
USE_TOOLSET: MSVC
|
USE_TOOLSET: MSVC
|
||||||
@ -41,7 +43,7 @@ matrix:
|
|||||||
USE_GENERATOR: MSBuild
|
USE_GENERATOR: MSBuild
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- C:\cmake-3.8.0-win32-x86
|
- C:\cmake-3.14.4-win32-x86
|
||||||
- C:\Tools\ninja
|
- C:\Tools\ninja
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@ -58,11 +60,11 @@ install:
|
|||||||
$env:PATH = "$env:NINJA_PATH;$env:PATH"
|
$env:PATH = "$env:NINJA_PATH;$env:PATH"
|
||||||
} else { Write-Warning "Failed to find ninja.exe in expected location." }
|
} else { Write-Warning "Failed to find ninja.exe in expected location." }
|
||||||
if ($env:USE_TOOLSET -ne "LLVM") {
|
if ($env:USE_TOOLSET -ne "LLVM") {
|
||||||
if (![IO.File]::Exists("C:\cmake-3.8.0-win32-x86\bin\cmake.exe")) {
|
if (![IO.File]::Exists("C:\cmake-3.14.0-win32-x86\bin\cmake.exe")) {
|
||||||
Start-FileDownload 'https://cmake.org/files/v3.8/cmake-3.8.0-win32-x86.zip'
|
Start-FileDownload 'https://cmake.org/files/v3.14/cmake-3.14.4-win32-x86.zip'
|
||||||
7z x -y -bso0 cmake-3.8.0-win32-x86.zip -oC:\
|
7z x -y -bso0 cmake-3.14.4-win32-x86.zip -oC:\
|
||||||
}
|
}
|
||||||
$env:PATH="C:\cmake-3.8.0-win32-x86\bin;$env:PATH"
|
$env:PATH="C:\cmake-3.14.4-win32-x86\bin;$env:PATH"
|
||||||
}
|
}
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
@ -72,16 +74,20 @@ before_build:
|
|||||||
$Architecture = $env:PLATFORM
|
$Architecture = $env:PLATFORM
|
||||||
if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") {
|
if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") {
|
||||||
$env:VCVARSALL = "`"$env:VCVAR2015`" $Architecture"
|
$env:VCVARSALL = "`"$env:VCVAR2015`" $Architecture"
|
||||||
} else {
|
} elseif ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2017") {
|
||||||
$env:VCVARSALL = "`"$env:VCVAR2017`" $Architecture"
|
$env:VCVARSALL = "`"$env:VCVAR2017`" $Architecture"
|
||||||
|
} else {
|
||||||
|
$env:VCVARSALL = "`"$env:VCVAR2019`" $Architecture"
|
||||||
}
|
}
|
||||||
$env:CMakeGenFlags = "-G Ninja -DGSL_CXX_STANDARD=$env:GSL_CXX_STANDARD"
|
$env:CMakeGenFlags = "-G Ninja -DGSL_CXX_STANDARD=$env:GSL_CXX_STANDARD"
|
||||||
} else {
|
} else {
|
||||||
$GeneratorFlags = '/m /v:minimal'
|
$GeneratorFlags = '/m /v:minimal'
|
||||||
if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") {
|
if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") {
|
||||||
$Generator = 'Visual Studio 14 2015'
|
$Generator = 'Visual Studio 14 2015'
|
||||||
} else {
|
} elseif ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2017") {
|
||||||
$Generator = 'Visual Studio 15 2017'
|
$Generator = 'Visual Studio 15 2017'
|
||||||
|
} else {
|
||||||
|
$Generator = 'Visual Studio 16 2019'
|
||||||
}
|
}
|
||||||
if ("$env:PLATFORM" -eq "x86") {
|
if ("$env:PLATFORM" -eq "x86") {
|
||||||
$Architecture = "Win32"
|
$Architecture = "Win32"
|
||||||
|
Loading…
Reference in New Issue
Block a user