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] upgrade to R 4.1.2 in CI, change approach to macOS-latest R CI builds (fixes #4988) #4989

Merged
merged 12 commits into from
Feb 1, 2022
17 changes: 15 additions & 2 deletions .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ if [[ "${R_MAJOR_VERSION}" == "3" ]]; then
export R_LINUX_VERSION="3.6.3-1bionic"
export R_APT_REPO="bionic-cran35/"
elif [[ "${R_MAJOR_VERSION}" == "4" ]]; then
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"
Copy link
Collaborator

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

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

Copy link
Collaborator Author

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

export R_APT_REPO="focal-cran40/"
else
echo "Unrecognized R version: ${R_VERSION}"
Expand Down Expand Up @@ -81,6 +81,19 @@ if [[ $OS_NAME == "macos" ]]; then
-pkg $(pwd)/R.pkg \
-target /

# Older R versions (<= 4.1.2) on newer macOS (>= 11.0.0) cannot create the necessary symlinks.
# See https://github.com/r-lib/actions/issues/412.
if [[ $(sw_vers -productVersion | head -c2) -ge "11" ]]; then
sudo ln \
-sf \
/Library/Frameworks/R.framework/Resources/bin/R \
/usr/local/bin/R
sudo ln \
-sf \
/Library/Frameworks/R.framework/Resources/bin/Rscript \
/usr/local/bin/Rscript
fi

# Fix "duplicate libomp versions" issue on Mac
# by replacing the R libomp.dylib with a symlink to the one installed with brew
if [[ $COMPILER == "clang" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .ci/test_r_package_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if ($env:R_MAJOR_VERSION -eq "3") {
$env:RTOOLS_BIN = "$RTOOLS_INSTALL_PATH\usr\bin"
$env:RTOOLS_MINGW_BIN = "$RTOOLS_INSTALL_PATH\mingw64\bin"
$env:RTOOLS_EXE_FILE = "rtools40v2-x86_64.exe"
$env:R_WINDOWS_VERSION = "4.1.1"
$env:R_WINDOWS_VERSION = "4.1.2"
} else {
Write-Output "[ERROR] Unrecognized R version: $env:R_VERSION"
Check-Output $false
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/r_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ jobs:
compiler: gcc
r_version: 3.6
build_type: cmake
- os: macOS-latest
- os: macOS-10.15
task: r-package
compiler: gcc
r_version: 4.0
r_version: 4.1
build_type: cmake
- os: macOS-latest
task: r-package
compiler: clang
r_version: 3.6
build_type: cmake
- os: macOS-latest
- os: macOS-10.15
task: r-package
compiler: clang
r_version: 4.0
r_version: 4.1
build_type: cmake
- os: windows-latest
task: r-package
Expand Down Expand Up @@ -125,10 +125,10 @@ jobs:
compiler: gcc
r_version: 4.0
build_type: cran
- os: macOS-latest
- os: macOS-10.15
task: r-package
compiler: clang
r_version: 4.0
r_version: 4.1
build_type: cran
################
# Other checks #
Expand All @@ -151,13 +151,13 @@ jobs:
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v1
- name: Setup and run tests on Linux and macOS
if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest'
if: startsWith(matrix.os, 'macOS') || matrix.os == 'ubuntu-latest'
shell: bash
run: |
export TASK="${{ matrix.task }}"
export COMPILER="${{ matrix.compiler }}"
export GITHUB_ACTIONS="true"
if [[ "${{ matrix.os }}" == "macOS-latest" ]]; then
if [[ $(echo "${{ matrix.os }}" | head -c5) == "macOS" ]]; then
export OS_NAME="macos"
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export OS_NAME="linux"
Expand Down