From a70895a86cb1973ebd653b7e544ddb2c2268c101 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 16 May 2020 18:28:36 +0100 Subject: [PATCH] [R-package] [ci] Fix CI timeouts for Mac builds on Travis (fixes #3091) (#3092) * [R-package] use processx to speed up builds * different fix * echoing more frequently * fix it * more stdout * use print() instead of message() * shell tricks * fix message * travis * Update .ci/test_r_package.sh Co-authored-by: Nikita Titov Co-authored-by: Nikita Titov --- .ci/test_r_package.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 8bab60fac567..d110260f36e2 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -82,9 +82,21 @@ export _R_CHECK_FORCE_SUGGESTS_=0 # fails tests if either ERRORs or WARNINGs are thrown by # R CMD CHECK check_succeeded="yes" -R CMD check ${PKG_TARBALL} \ - --as-cran \ -|| check_succeeded="no" +( + R CMD check ${PKG_TARBALL} \ + --as-cran \ + || check_succeeded="no" +) & + +# R CMD check suppresses output, some CIs kill builds after +# a few minutes with no output. This trick gives R CMD check more time +# * https://github.com/travis-ci/travis-ci/issues/4190#issuecomment-169987525 +# * https://stackoverflow.com/a/29890106/3986677 +CHECK_PID=$! +while kill -0 ${CHECK_PID} >/dev/null 2>&1; do + echo -n -e " \b" + sleep 5 +done echo "R CMD check build logs:" cat ${BUILD_DIRECTORY}/lightgbm.Rcheck/00install.out