Unverified Commit 3798f872 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] fail R macOS CI jobs earlier when installations fail (#5129)

* [ci] fail CI jobs earlier when installations fail

* more reliable link for R.pkg
parent 3fd29139
...@@ -17,10 +17,12 @@ fi ...@@ -17,10 +17,12 @@ fi
R_MAJOR_VERSION=( ${R_VERSION//./ } ) R_MAJOR_VERSION=( ${R_VERSION//./ } )
if [[ "${R_MAJOR_VERSION}" == "3" ]]; then if [[ "${R_MAJOR_VERSION}" == "3" ]]; then
export R_MAC_VERSION=3.6.3 export R_MAC_VERSION=3.6.3
export R_MAC_PKG_URL=https://cran.r-project.org/bin/macosx/R-${R_MAC_VERSION}.pkg
export R_LINUX_VERSION="3.6.3-1bionic" export R_LINUX_VERSION="3.6.3-1bionic"
export R_APT_REPO="bionic-cran35/" export R_APT_REPO="bionic-cran35/"
elif [[ "${R_MAJOR_VERSION}" == "4" ]]; then elif [[ "${R_MAJOR_VERSION}" == "4" ]]; then
export R_MAC_VERSION=4.1.2 export R_MAC_VERSION=4.1.2
export R_MAC_PKG_URL=https://cran.r-project.org/bin/macosx/base/R-${R_MAC_VERSION}.pkg
export R_LINUX_VERSION="4.1.2-1.2004.0" export R_LINUX_VERSION="4.1.2-1.2004.0"
export R_APT_REPO="focal-cran40/" export R_APT_REPO="focal-cran40/"
else else
...@@ -66,20 +68,20 @@ fi ...@@ -66,20 +68,20 @@ fi
if [[ $OS_NAME == "macos" ]]; then if [[ $OS_NAME == "macos" ]]; then
brew update-reset && brew update brew update-reset && brew update
if [[ $R_BUILD_TYPE == "cran" ]]; then if [[ $R_BUILD_TYPE == "cran" ]]; then
brew install automake brew install automake || exit -1
fi fi
brew install \ brew install \
checkbashisms \ checkbashisms \
qpdf qpdf || exit -1
brew install --cask basictex brew install --cask basictex || exit -1
export PATH="/Library/TeX/texbin:$PATH" export PATH="/Library/TeX/texbin:$PATH"
sudo tlmgr --verify-repo=none update --self sudo tlmgr --verify-repo=none update --self || exit -1
sudo tlmgr --verify-repo=none install inconsolata helvetic sudo tlmgr --verify-repo=none install inconsolata helvetic || exit -1
curl -sL https://cran.r-project.org/bin/macosx/R-${R_MAC_VERSION}.pkg -o R.pkg curl -sL ${R_MAC_PKG_URL} -o R.pkg || exit -1
sudo installer \ sudo installer \
-pkg $(pwd)/R.pkg \ -pkg $(pwd)/R.pkg \
-target / -target / || exit -1
# Older R versions (<= 4.1.2) on newer macOS (>= 11.0.0) cannot create the necessary symlinks. # 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. # See https://github.com/r-lib/actions/issues/412.
......
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