From 841b199d89e9045d23a5b5f96b79c90c29fe92e6 Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Thu, 13 May 2021 13:04:16 -0400 Subject: [PATCH] [gpuCI] Clear stale CMake files and report failures. --- ci/common/build.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ci/common/build.bash b/ci/common/build.bash index 0964ba1cf..d53352dae 100755 --- a/ci/common/build.bash +++ b/ci/common/build.bash @@ -232,7 +232,11 @@ fi log "Configure Thrust and CUB..." +# Clear out any stale CMake configs: +rm -rf CMakeCache.txt CMakeFiles/ + echo_and_run_timed "Configure" cmake .. ${CMAKE_FLAGS} +configure_status=$? log "Build Thrust and CUB..." @@ -240,6 +244,7 @@ log "Build Thrust and CUB..." # determine_build_parallelism.bash, so it can't be part of ${CMAKE_BUILD_FLAGS}. set +e # Don't stop on build failures. echo_and_run_timed "Build" cmake --build . ${CMAKE_BUILD_FLAGS} -j ${PARALLEL_LEVEL} +build_status=$? set -e ################################################################################ @@ -249,4 +254,20 @@ set -e log "Test Thrust and CUB..." echo_and_run_timed "Test" ctest ${CTEST_FLAGS} +test_status=$? + +################################################################################ +# SUMMARY - Print status of each step and exit with failure if needed. +################################################################################ +log "Summary:" +log "- Configure Error Code: ${configure_status}" +log "- Build Error Code: ${build_status}" +log "- Test Error Code: ${test_status}" + + +if [[ "${configure_status}" != "0" ]] || \ + [[ "${build_status}" != "0" ]] || \ + [[ "${test_status}" != "0" ]]; then + exit 1 +fi