]> granicus.if.org Git - graphviz/commitdiff
Fix silent fail of Windows build in CI
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 6 Sep 2020 19:13:18 +0000 (21:13 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Sun, 6 Sep 2020 21:27:32 +0000 (23:27 +0200)
Fixes https://gitlab.com/graphviz/graphviz/-/issues/1815.

windows/bin/build.ps1
windows/bin/setup-and-build.ps1

index acac72c12ecf7791d98489756d636ee379060385..2f702a435c1f411607981d9b1ff4f2d87a535d1a 100644 (file)
@@ -23,11 +23,23 @@ if ($buildsystem -eq "cmake") {
     cd build
 
     cmake -G "Visual Studio 16 2019" -A $platform ..
+    if ($LastExitCode -ne 0) {
+        exit $LastExitCode
+    }
     cmake --build . --config $configuration
+    if ($LastExitCode -ne 0) {
+        exit $LastExitCode
+    }
 
     cpack -C $configuration
+    if ($LastExitCode -ne 0) {
+        exit $LastExitCode
+    }
 } else {
     MSBuild.exe -p:Configuration=$configuration -p:Platform=$platform graphviz.sln
+    if ($LastExitCode -ne 0) {
+        exit $LastExitCode
+    }
     if ($configuration -eq "Release") {
           rm Release\Graphviz\bin\*.lastcodeanalysissucceeded
           rm Release\Graphviz\bin\*.iobj
index a8bc771562dea209ad81137317c509f6aa949c4b..5f6a5b30e5872037a8cb1277e4a8a26ffb79f498 100644 (file)
@@ -5,3 +5,6 @@ $dir = $PSScriptRoot
 Invoke-Expression "$dir\setup-build-utilities.ps1"
 
 powershell.exe -ExecutionPolicy Bypass -Command "$dir\build.ps1" $args
+if ($LastExitCode -ne 0) {
+    exit $LastExitCode
+}