diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 5f2a298ef52f..752798c57e5d 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..39beeefc247d 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 -ne "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"