From a6a2d6cb6ca0e8d10f92be36918597c2eed02d3e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 8 Mar 2021 23:39:50 -0600 Subject: [PATCH] [ci] fix R CMD CHECK note about example timings (fixes #4049) --- .ci/test_r_package.sh | 6 ++++++ .ci/test_r_package_windows.ps1 | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 5f2a298ef52f..58019fca0c4e 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -20,6 +20,12 @@ export _R_CHECK_CRAN_INCOMING_REMOTE_=0 # to catch extreme problems export _R_CHECK_PKG_SIZES_THRESHOLD_=60 +# don't fail builds for long-running examples unless they're very long +# See https://github.com/microsoft/LightGBM/issues/4049#issuecomment-793412254. +if [[ $R_BUILD_TYPE != "cran" ]]; then + export _R_CHECK_EXAMPLE_TIMING_THRESHOLD_=30 +fi + # Get details needed for installing R components R_MAJOR_VERSION=( ${R_VERSION//./ } ) if [[ "${R_MAJOR_VERSION}" == "3" ]]; then diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 75bbf8f634ba..37227934283e 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -72,6 +72,12 @@ $env:_R_CHECK_CRAN_INCOMING_REMOTE_ = 0 # to catch extreme problems $env:_R_CHECK_PKG_SIZES_THRESHOLD_ = 60 +# don't fail builds for long-running examples unless they're very long +# See https://github.com/microsoft/LightGBM/issues/4049#issuecomment-793412254. +if ($env:R_BUILD_TYPE -eq "cran") { + $env:_R_CHECK_EXAMPLE_TIMING_THRESHOLD_ = 30 +} + if (($env:COMPILER -eq "MINGW") -and ($env:R_BUILD_TYPE -eq "cmake")) { $env:CXX = "$env:RTOOLS_MINGW_BIN/g++.exe" $env:CC = "$env:RTOOLS_MINGW_BIN/gcc.exe"