]> granicus.if.org Git - libevent/commitdiff
appveyor: check intermediate powershell commands exit codes and terminate early
authorAzat Khuzhin <azat@libevent.org>
Tue, 2 Apr 2019 20:25:08 +0000 (23:25 +0300)
committerAzat Khuzhin <azat@libevent.org>
Tue, 2 Apr 2019 20:31:43 +0000 (23:31 +0300)
Otherwise build errors will be ignored, i.e. if build fails but regress
binary exists (copied from artifacts) it will be runned instead of newly
compiled.

appveyor.yml

index c0959f7e6d39009fa52865455403439b37202c6f..651449293a8d13ae9947d04c06a5774d2e9d9062 100644 (file)
@@ -81,18 +81,25 @@ build_script:
         $env:CFLAGS="-I$($env:OPENSSL_ROOT)/include"
 
         bash ./autogen.sh 2>&1 3>&1
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
 
         md build-autotools 2> $null
         cd build-autotools
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
 
         bash ../configure $env:EVENT_CONFIGURE_OPTIONS 2>&1
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
         make -j $env:EVENT_BUILD_PARALLEL 2>&1
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
         make verify -j $env:EVENT_TESTS_PARALLEL 2>&1
       } else {
         md build-cmake 2> $null
         cd build-cmake
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
         cmake -G "Visual Studio 15 2017 Win64" .. $env:EVENT_CMAKE_OPTIONS
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
         cmake --build . -j $env:EVENT_BUILD_PARALLEL -- /nologo /verbosity:minimal
+        if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode)  }
         ctest --output-on-failure -j $env:EVENT_TESTS_PARALLEL
       }