Browse Source

add vs2017 build to AppVeyor (#2248)

* add vs2017 build to AppVeyor

* fixed typo in install.ps1
escherstair 5 years ago
parent
commit
9e4eed375a
3 changed files with 12 additions and 4 deletions
  1. 8 0
      appveyor.yml
  2. 2 2
      tools/appveyor/build.ps1
  3. 2 2
      tools/appveyor/install.ps1

+ 8 - 0
appveyor.yml

@@ -41,6 +41,14 @@ environment:
           FORCE_CXX: OFF
           OUT_DIR_LIB: bin\Debug
           OUT_DIR_EXAMPLES: bin\examples\Debug
+        - CC_NAME: Visual Studio 15 2017
+          CC_SHORTNAME: vs2017
+          APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+          GENERATOR: Visual Studio 15 2017
+          MAKE: msbuild /p:ContinueOnError=false /p:StopOnFirstFailure=true open62541.sln
+          FORCE_CXX: OFF
+          OUT_DIR_LIB: bin\Debug
+          OUT_DIR_EXAMPLES: bin\examples\Debug
         - CC_NAME: Clang
           CC_SHORTNAME: clang-mingw
           GENERATOR: MinGW Makefiles

+ 2 - 2
tools/appveyor/build.ps1

@@ -131,8 +131,8 @@ try {
     Remove-Item -Path pack_tmp -Recurse -Force
     Remove-Item -Path build -Recurse -Force
 
-    # Only execute unit tests on vs2015 to save compilation time
-    if ($env:CC_SHORTNAME -eq "vs2015") {
+    # Only execute unit tests on vs2015 and vs2017 to save compilation time
+    if ($env:CC_SHORTNAME -eq "vs2015" -or $env:CC_SHORTNAME -eq "vs2017") {
         Write-Host -ForegroundColor Green "`n###################################################################"
         Write-Host -ForegroundColor Green "`n##### Testing $env:CC_NAME with unit tests #####`n"
         New-Item -ItemType directory -Path "build"

+ 2 - 2
tools/appveyor/install.ps1

@@ -15,7 +15,7 @@ try {
         # See https://github.com/open62541/open62541/issues/2068
         & C:\msys64\usr\bin\mkdir -p /var/cache/pacman/pkg
         & C:\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-mbedtls
-    } elseif ($env:CC_SHORTNAME -eq "vs2015") {
+    } elseif ($env:CC_SHORTNAME -eq "vs2015" -or $env:CC_SHORTNAME -eq "vs2017") {
         # we need the static version, since open62541 is built with /MT
         # vcpkg currently only supports VS2015 and newer builds
         & vcpkg install mbedtls:x86-windows-static
@@ -25,7 +25,7 @@ try {
         exit $LASTEXITCODE
     }
 
-    if ($env:CC_SHORTNAME -eq "vs2015") {
+    if ($env:CC_SHORTNAME -eq "vs2015" -or $env:CC_SHORTNAME -eq "vs2017") {
         Write-Host -ForegroundColor Green "`n### Installing libcheck ###`n"
         & appveyor DownloadFile https://github.com/Pro/check/releases/download/0.12.0_dbg/check.zip
         & 7z x check.zip -oc:\ -bso0 -bsp0