appveyor: build improvements

- ensure failing build if tests fail
- always build msix, even if unsigned
This commit is contained in:
Philipp Wolfer
2019-11-16 21:35:06 +01:00
parent 8ffab7296d
commit fc6c052fbb
2 changed files with 7 additions and 5 deletions

View File

@@ -73,6 +73,9 @@ test_script:
pytest -ra --junitxml=test-results.xml
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-results.xml))
If ($LastExitCode -ne 0) {
Throw "Tests failed"
}
- dist\picard\fpcalc -version
for:
@@ -95,10 +98,8 @@ for:
build_script:
- ps: |
$Certificate = @(Get-ChildItem cert:\CurrentUser\My -codesign)[0]
if ($Certificate) {
& .\scripts\package\win-package-appx.ps1 -BuildNumber $env:APPVEYOR_BUILD_NUMBER -Certificate $Certificate
Push-AppveyorArtifact dist\*.msix
}
& .\scripts\package\win-package-appx.ps1 -BuildNumber $env:APPVEYOR_BUILD_NUMBER -Certificate $Certificate
Push-AppveyorArtifact dist\*.msix
deploy:
- provider: GitHub

View File

@@ -12,7 +12,8 @@ Function CodeSignBinary {
$BinaryPath
)
If ($Certificate) {
Set-AuthenticodeSignature -FilePath $BinaryPath -Certificate $Certificate
Set-AuthenticodeSignature -FilePath $BinaryPath -Certificate $Certificate `
-ErrorAction Stop
} Else {
Write-Output "Skip signing $BinaryPath"
}