Skip to content

Commit 8c34b4d

Browse files
authored
Merge pull request NVIDIA#1435 from allisonvacanti/report_gpuci_failures
[gpuCI] Clear stale CMake files and report failures.
2 parents 29ce69c + 841b199 commit 8c34b4d

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

ci/common/build.bash

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,19 @@ fi
232232

233233
log "Configure Thrust and CUB..."
234234

235+
# Clear out any stale CMake configs:
236+
rm -rf CMakeCache.txt CMakeFiles/
237+
235238
echo_and_run_timed "Configure" cmake .. ${CMAKE_FLAGS}
239+
configure_status=$?
236240

237241
log "Build Thrust and CUB..."
238242

239243
# ${PARALLEL_LEVEL} needs to be passed after we run
240244
# determine_build_parallelism.bash, so it can't be part of ${CMAKE_BUILD_FLAGS}.
241245
set +e # Don't stop on build failures.
242246
echo_and_run_timed "Build" cmake --build . ${CMAKE_BUILD_FLAGS} -j ${PARALLEL_LEVEL}
247+
build_status=$?
243248
set -e
244249

245250
################################################################################
@@ -249,4 +254,20 @@ set -e
249254
log "Test Thrust and CUB..."
250255

251256
echo_and_run_timed "Test" ctest ${CTEST_FLAGS}
257+
test_status=$?
258+
259+
################################################################################
260+
# SUMMARY - Print status of each step and exit with failure if needed.
261+
################################################################################
252262

263+
log "Summary:"
264+
log "- Configure Error Code: ${configure_status}"
265+
log "- Build Error Code: ${build_status}"
266+
log "- Test Error Code: ${test_status}"
267+
268+
269+
if [[ "${configure_status}" != "0" ]] || \
270+
[[ "${build_status}" != "0" ]] || \
271+
[[ "${test_status}" != "0" ]]; then
272+
exit 1
273+
fi

0 commit comments

Comments
 (0)