From a6a2d6cb6ca0e8d10f92be36918597c2eed02d3e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 8 Mar 2021 23:39:50 -0600 Subject: [PATCH 1/3] [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" From 4a76c9a11c003b9b355d1b88af27b26f505d38bb Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 9 Mar 2021 08:59:02 -0600 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Nikita Titov --- .ci/test_r_package.sh | 2 +- .ci/test_r_package_windows.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 58019fca0c4e..752798c57e5d 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -20,7 +20,7 @@ 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 +# 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 diff --git a/.ci/test_r_package_windows.ps1 b/.ci/test_r_package_windows.ps1 index 37227934283e..39beeefc247d 100644 --- a/.ci/test_r_package_windows.ps1 +++ b/.ci/test_r_package_windows.ps1 @@ -72,9 +72,9 @@ $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 +# 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") { +if ($env:R_BUILD_TYPE -ne "cran") { $env:_R_CHECK_EXAMPLE_TIMING_THRESHOLD_ = 30 } From adc1d6acbfbfe626040bf40dd9471cd1ccfd42ba Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 9 Mar 2021 15:26:41 -0600 Subject: [PATCH 3/3] empty commit