-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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] upgrade to R 4.1.2 in CI, change approach to macOS-latest R CI builds (fixes #4988) #4989
Conversation
It looks like these symlink changes fixed the issue for R 3.6.x, but not R 4.1.x: https://github.com/microsoft/LightGBM/runs/4994766651?check_suite_focus=true I noticed at https://cran.r-project.org/bin/macosx/base/ that R 4.1.2 was published in November 2021. This project's CI currently uses R 4.1.1, published in August 2021. I pushed 8117a05 updated the R version to 4.1.2, hoping that that version's installer would work with macOS 11.x. Probably a good idea to do this anyway, per #3763. |
Ok I think this is ready for review! Sorry that the research is split between comments here and on #4988, I should have tried to keep them all in one place. Summary of changes:
|
Thanks for looking into this! Why can't we use the latest versions of macOS and R together? I believe this is the most popular scenario among users. Maybe we can use Homebrew installation for R? |
I don't know, but I can see in #4988 (comment) that GitHub itself was also not able to build the latest version of R on the When I tried that with R 4.1.2 from CRAN, I saw the following error (build link)
Maybe. I've never used R from homebrew before (in this project, other projects, or personally) so I can't say how that differs from the If you want to try that you're welcome to push commits to this branch. But I don't have much time to devote to LightGBM this week so I can't commit to trying that. I think this PR in its current state is sufficient to unblock CI in this project without losing any coverage of OS-compiler-R_version combinations, as until a few days ago we were also not testing the R package with R 4.1.2 + macOS 11.x. |
Also linking related feature request: actions/runner-images#4960. |
Could you please document this in a new our internal feature request? |
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.
LGTM except one suggestion below.
Thank you for unblocking CI!
export R_MAC_VERSION=4.1.1 | ||
export R_LINUX_VERSION="4.1.1-1.2004.0" | ||
export R_MAC_VERSION=4.1.2 | ||
export R_LINUX_VERSION="4.1.2-1.2004.0" |
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.
I guess we need update all R versions in this list (4.0
-> 4.1
), not only for macOS
LightGBM/.github/workflows/r_package.yml
Lines 30 to 140 in 0075814
matrix: | |
include: | |
################ | |
# CMake builds # | |
################ | |
- os: ubuntu-latest | |
task: r-package | |
compiler: gcc | |
r_version: 3.6 | |
build_type: cmake | |
- os: ubuntu-latest | |
task: r-package | |
compiler: gcc | |
r_version: 4.0 | |
build_type: cmake | |
- os: ubuntu-latest | |
task: r-package | |
compiler: clang | |
r_version: 3.6 | |
build_type: cmake | |
- os: ubuntu-latest | |
task: r-package | |
compiler: clang | |
r_version: 4.0 | |
build_type: cmake | |
- os: macOS-latest | |
task: r-package | |
compiler: gcc | |
r_version: 3.6 | |
build_type: cmake | |
- os: macOS-latest | |
task: r-package | |
compiler: gcc | |
r_version: 4.0 | |
build_type: cmake | |
- os: macOS-latest | |
task: r-package | |
compiler: clang | |
r_version: 3.6 | |
build_type: cmake | |
- os: macOS-latest | |
task: r-package | |
compiler: clang | |
r_version: 4.0 | |
build_type: cmake | |
- os: windows-latest | |
task: r-package | |
compiler: MINGW | |
toolchain: MINGW | |
r_version: 3.6 | |
build_type: cmake | |
- os: windows-latest | |
task: r-package | |
compiler: MINGW | |
toolchain: MSYS | |
r_version: 4.0 | |
build_type: cmake | |
# Visual Studio 2017 | |
- os: windows-2016 | |
task: r-package | |
compiler: MSVC | |
toolchain: MSVC | |
r_version: 3.6 | |
build_type: cmake | |
# Visual Studio 2019 | |
- os: windows-2019 | |
task: r-package | |
compiler: MSVC | |
toolchain: MSVC | |
r_version: 4.0 | |
build_type: cmake | |
# Visual Studio 2022 | |
- os: windows-2022 | |
task: r-package | |
compiler: MSVC | |
toolchain: MSVC | |
r_version: 4.0 | |
build_type: cmake | |
############### | |
# CRAN builds # | |
############### | |
- os: windows-latest | |
task: r-package | |
compiler: MINGW | |
toolchain: MINGW | |
r_version: 3.6 | |
build_type: cran | |
- os: windows-latest | |
task: r-package | |
compiler: MINGW | |
toolchain: MSYS | |
r_version: 4.0 | |
build_type: cran | |
- os: ubuntu-latest | |
task: r-package | |
compiler: gcc | |
r_version: 4.0 | |
build_type: cran | |
- os: macOS-latest | |
task: r-package | |
compiler: clang | |
r_version: 4.0 | |
build_type: cran | |
################ | |
# Other checks # | |
################ | |
- os: ubuntu-latest | |
task: r-rchk | |
compiler: gcc | |
r_version: 4.0 | |
build_type: cran |
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.
ah yep you're right! Updated in 7cb0fd0
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Fixes #4988.
See #4988 for a description of recent CI issues with R macOS builds.
I believe it could be related to GitHub Actions upgrading its
macOS-latest
environment to macOS 11.x 2 days ago. See actions/runner-images#4048.Searched around GitHub a bit and found a discussion in
r-lib/actions
that seems relevant. r-lib/actions#412 describes an issue where older R installers can't create the necessary symlinks toR
andRscript
on macOS 11.x.The changes in this PR are based on the changes that that project used to fix that issue: r-lib/actions@a1c2c67