Convert build script to PowerShell

Close #205.
This commit is contained in:
Friedrich von Never 2018-10-27 22:02:09 +07:00 committed by Stanislav Ershov
parent 2a341d77b1
commit de6b51bc4e
3 changed files with 14 additions and 6 deletions

View File

@ -1,5 +0,0 @@
pushd %APPVEYOR_BUILD_FOLDER%\build
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
cmake --build . --config RelWithDebInfo
ctest .
popd

13
.appveyor/build.ps1 Normal file
View File

@ -0,0 +1,13 @@
$ErrorActionPreference = 'Stop'
Push-Location "$env:APPVEYOR_BUILD_FOLDER\build"
try {
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
if (!$?) { throw 'Error running cmake' }
cmake --build . --config RelWithDebInfo
if (!$?) { throw 'Error building with cmake' }
ctest .
if (!$?) { throw 'ctest execution error' }
} finally {
Pop-Location
}

View File

@ -31,7 +31,7 @@ before_build:
- cmd: .appveyor\before_build.cmd - cmd: .appveyor\before_build.cmd
build_script: build_script:
- cmd: .appveyor\build.cmd - ps: .appveyor\build.ps1
after_build: after_build:
- ps: .appveyor\after_build.ps1 - ps: .appveyor\after_build.ps1