From ba7fbbb69b1e40584b2b53a9eccbd0fd580c1ca8 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 19 Sep 2021 23:26:27 -0600 Subject: [PATCH] ci: move appveyor build to separate .ps1 script to suppress failing on writes to stderr. see: https://help.appveyor.com/discussions/problems/10014-false-build-fail-status --- appveyor.yml | 56 +--------------------------------------------- build-appveyor.ps1 | 54 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) create mode 100644 build-appveyor.ps1 diff --git a/appveyor.yml b/appveyor.yml index c244a9a3..afb35f86 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,61 +10,7 @@ install: - ps: Invoke-WebRequest 'https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-win.zip' -OutFile 'tbb.zip' - ps: 7z x tbb.zip -oc:\ build_script: -- ps: >- - git submodule update --init --recursive - - $env:Path += ";C:\cygwin64\bin" - - # For sha256sum - $env:Path += ";C:\Program Files\Git\usr\bin" - - mkdir cmakebuild - - cd cmakebuild - - cmake .. -T v142 -Dembree_DIR="C:\embree-3.12.1.x64.vc14.windows" -DTBB_DIR="C:\tbb\cmake" -DCMAKE_GENERATOR_PLATFORM=x64 -DENABLE_LIGHTPREVIEW=NO -DQt5Widgets_DIR="C:\Qt\5.8\msvc2013_64\lib\cmake\Qt5Widgets" - - $cmakePlatform = "x64" - - msbuild /target:testlight /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln - - if ( $? -eq $false ) { - throw "testlight failed to build" - } - - msbuild /target:testqbsp /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln - - if ( $? -eq $false ) { - throw "testqbsp failed to build" - } - - msbuild /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" PACKAGE.vcxproj - - if ( $? -eq $false ) { - throw "package failed" - } - - .\light\Release\testlight.exe - - if ( $? -eq $false ) { - throw "testlight failed" - } - - .\qbsp\Release\testqbsp.exe - - if ( $? -eq $false ) { - throw "testqbsp failed" - } - - $env:Path += ";$(pwd)\qbsp\Release;$(pwd)\vis\Release;$(pwd)\light\Release" - - cd ..\testmaps - - . "C:\Program Files\Git\usr\bin\bash.exe" .\automatated_tests.sh - - if ( $LastExitCode -ne 0 ) { - throw "automatated_tests.sh failed" - } +- cmd: powershell .\build-appveyor.ps1 artifacts: - path: cmakebuild\*.zip deploy: diff --git a/build-appveyor.ps1 b/build-appveyor.ps1 new file mode 100644 index 00000000..8183374b --- /dev/null +++ b/build-appveyor.ps1 @@ -0,0 +1,54 @@ +git submodule update --init --recursive + +$env:Path += ";C:\cygwin64\bin" + +# For sha256sum +$env:Path += ";C:\Program Files\Git\usr\bin" + +mkdir cmakebuild + +cd cmakebuild + +cmake .. -T v142 -Dembree_DIR="C:\embree-3.12.1.x64.vc14.windows" -DTBB_DIR="C:\tbb\cmake" -DCMAKE_GENERATOR_PLATFORM=x64 -DENABLE_LIGHTPREVIEW=NO -DQt5Widgets_DIR="C:\Qt\5.8\msvc2013_64\lib\cmake\Qt5Widgets" + +$cmakePlatform = "x64" + +msbuild /target:testlight /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln + +if ( $? -eq $false ) { + throw "testlight failed to build" +} + +msbuild /target:testqbsp /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" ericw-tools.sln + +if ( $? -eq $false ) { + throw "testqbsp failed to build" +} + +msbuild /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" PACKAGE.vcxproj + +if ( $? -eq $false ) { + throw "package failed" +} + +.\light\Release\testlight.exe + +if ( $? -eq $false ) { + throw "testlight failed" +} + +.\qbsp\Release\testqbsp.exe + +if ( $? -eq $false ) { + throw "testqbsp failed" +} + +$env:Path += ";$(pwd)\qbsp\Release;$(pwd)\vis\Release;$(pwd)\light\Release" + +cd ..\testmaps + +. "C:\Program Files\Git\usr\bin\bash.exe" .\automatated_tests.sh + +if ( $LastExitCode -ne 0 ) { + throw "automatated_tests.sh failed" +}