From 36c50d03759cc98d9071bcdf910ff21525ec2ea2 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sun, 6 Sep 2020 21:13:18 +0200 Subject: [PATCH] Fix silent fail of Windows build in CI Fixes https://gitlab.com/graphviz/graphviz/-/issues/1815. --- windows/bin/build.ps1 | 12 ++++++++++++ windows/bin/setup-and-build.ps1 | 3 +++ 2 files changed, 15 insertions(+) diff --git a/windows/bin/build.ps1 b/windows/bin/build.ps1 index acac72c12..2f702a435 100644 --- a/windows/bin/build.ps1 +++ b/windows/bin/build.ps1 @@ -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 diff --git a/windows/bin/setup-and-build.ps1 b/windows/bin/setup-and-build.ps1 index a8bc77156..5f6a5b30e 100644 --- a/windows/bin/setup-and-build.ps1 +++ b/windows/bin/setup-and-build.ps1 @@ -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 +} -- 2.40.0