Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] fix R CMD CHECK note about example timings (fixes #4049) #4055

Merged
merged 4 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you are wondering "why only do this on non-cran builds?", my proposal from #4049 (comment)

I also think it would be a good idea to only do that when BUILD_TYPE = "cmake", just in case the behavior of R CMD check --as-cran changes in the future (like how it started running \donttest{} examples automatically in R 4.0.0, https://cran.r-project.org/doc/manuals/r-devel/NEWS.html).

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
Expand Down
6 changes: 6 additions & 0 deletions .ci/test_r_package_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down