Unverified Commit 0688f471 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] upgrade to R 4.1.2 in CI, change approach to macOS-latest R CI builds (fixes #4988) (#4989)

* [ci] manually create symlinks to R entrypoints on macOS (fixes #4988)

* exclude non-R CI jobs

* upgrade to R 4.1.2

* get logs for R install

* pin R 4.1.x jobs to macOS-10.15

* update to R 4.1.2 on Windows

* allow for non-latest macOS builds in GHA configuration

* fix prefix check

* fix config check

* more direct check for mac version

* uncomment other CIs

* update R version in CI job names
parent 0075814f
......@@ -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"
export R_APT_REPO="focal-cran40/"
else
echo "Unrecognized R version: ${R_VERSION}"
......@@ -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
......
......@@ -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
......
......@@ -40,7 +40,7 @@ jobs:
- os: ubuntu-latest
task: r-package
compiler: gcc
r_version: 4.0
r_version: 4.1
build_type: cmake
- os: ubuntu-latest
task: r-package
......@@ -50,27 +50,27 @@ jobs:
- os: ubuntu-latest
task: r-package
compiler: clang
r_version: 4.0
r_version: 4.1
build_type: cmake
- os: macOS-latest
task: r-package
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
......@@ -82,7 +82,7 @@ jobs:
task: r-package
compiler: MINGW
toolchain: MSYS
r_version: 4.0
r_version: 4.1
build_type: cmake
# Visual Studio 2017
- os: windows-2016
......@@ -96,14 +96,14 @@ jobs:
task: r-package
compiler: MSVC
toolchain: MSVC
r_version: 4.0
r_version: 4.1
build_type: cmake
# Visual Studio 2022
- os: windows-2022
task: r-package
compiler: MSVC
toolchain: MSVC
r_version: 4.0
r_version: 4.1
build_type: cmake
###############
# CRAN builds #
......@@ -118,17 +118,17 @@ jobs:
task: r-package
compiler: MINGW
toolchain: MSYS
r_version: 4.0
r_version: 4.1
build_type: cran
- os: ubuntu-latest
task: r-package
compiler: gcc
r_version: 4.0
r_version: 4.1
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 #
......@@ -136,7 +136,7 @@ jobs:
- os: ubuntu-latest
task: r-rchk
compiler: gcc
r_version: 4.0
r_version: 4.1
build_type: cran
steps:
- name: Prevent conversion of line endings on Windows
......@@ -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"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment