-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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] consolidate R package installs into a CI script #6808
base: master
Are you sure you want to change the base?
Conversation
@@ -65,7 +65,7 @@ jobs: | |||
shell: bash | |||
# yamllint disable rule:line-length | |||
run: | | |||
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'roxygen2', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" | |||
Rscript ./.ci/install-r-deps.R --build --roxygen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice... {testthat}
and all its dependencies were being installed unnecessarily here! So this change should also make the static analysis job a little faster 🎉
.ci/test-r-package-windows.ps1
Outdated
# $command_args_patch = "commandArgs <- function(...){c('--build', '--test')};" | ||
# Invoke-R-Code-Redirect-Stderr "$command_args_patch source('install-r-deps.R')" ; Assert-Output $? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# $command_args_patch = "commandArgs <- function(...){c('--build', '--test')};" | |
# Invoke-R-Code-Redirect-Stderr "$command_args_patch source('install-r-deps.R')" ; Assert-Output $? |
This seems to work ok without the more complicated Invoke-R-Code-Redirect-Stderr
pattern 😁
Follow-up to #6804 (comment)
Consolidates the various
install.packages()
calls across the project's CI into a single.ci/
script.Notes for Reviewers
I'm intentionally not proposing updating user-facing docs like this:
LightGBM/R-package/README.md
Lines 429 to 431 in 425395d
I'd like to keep this script limited to LightGBM's CI, and changeable at any time. I don't want to make it a part of the public interface of the project or encourage anyone else to use it.