summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-06-18 21:21:58 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-06-18 22:20:13 -0700
commit9357837d2e4331a29bdab77120d5baaaec05de50 (patch)
tree09b74d392342edb181af8a100b562d91935ffb14
parent7418bd0d7941149a6ee7d06ad9f724cdb635ea44 (diff)
Add VS2017 to AppVeyor test run
This requires moving the list of VS versions out of autotest-appveyor.ps1 and into appveyor.yml.
-rw-r--r--appveyor.yml11
-rw-r--r--tests/autotest-appveyor.ps113
2 files changed, 17 insertions, 7 deletions
diff --git a/appveyor.yml b/appveyor.yml
index a42990f..51adf2e 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,6 +1,6 @@
image:
-- Visual Studio 2015
-- Visual Studio 2017
+ - Visual Studio 2015
+ - Visual Studio 2017
version: "{branch}-{build}"
@@ -11,10 +11,11 @@ install:
- ps: Import-Module CoApp
build_script:
- - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017"){.\scripts\nuget_build.ps1}
+ - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\scripts\nuget_build.ps1 }
test_script:
- - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015"){.\tests\autotest-appveyor.ps1}
+ - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") { .\tests\autotest-appveyor.ps1 9 10 11 12 14 }
+ - ps: if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") { .\tests\autotest-appveyor.ps1 15 }
artifacts:
- - path: .\scripts\*.nupkg \ No newline at end of file
+ - path: .\scripts\*.nupkg
diff --git a/tests/autotest-appveyor.ps1 b/tests/autotest-appveyor.ps1
index 0b8717c..e3805c7 100644
--- a/tests/autotest-appveyor.ps1
+++ b/tests/autotest-appveyor.ps1
@@ -12,13 +12,22 @@ function Invoke-CmdScript($scriptName)
$sources = @("src/pugixml.cpp") + (Get-ChildItem -Path "tests/*.cpp" -Exclude "fuzz_*.cpp")
$failed = $FALSE
-foreach ($vs in 9,10,11,12,14)
+foreach ($vs in $args)
{
foreach ($arch in "x86","x64")
{
Write-Output "# Setting up VS$vs $arch"
- Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio $vs.0\VC\vcvarsall.bat" $arch
+ if ($vs -eq 15)
+ {
+ $vsdevcmdarch = if ($arch -eq "x64") { "amd64" } else { "x86" }
+ Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" "-arch=$vsdevcmdarch"
+ }
+ else
+ {
+ Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio $vs.0\VC\vcvarsall.bat" $arch
+ }
+
if (! $?) { throw "Error setting up VS$vs $arch" }
foreach ($defines in "standard", "PUGIXML_WCHAR_MODE", "PUGIXML_COMPACT")