[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
This commit is contained in:
James Lamb 2022-04-05 22:17:58 -05:00 коммит произвёл GitHub
Родитель 3fd291396e
Коммит 3798f8720f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -17,10 +17,12 @@ fi
R_MAJOR_VERSION=( ${R_VERSION//./ } )
if [[ "${R_MAJOR_VERSION}" == "3" ]]; then
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_APT_REPO="bionic-cran35/"
elif [[ "${R_MAJOR_VERSION}" == "4" ]]; then
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_APT_REPO="focal-cran40/"
else
@ -66,20 +68,20 @@ fi
if [[ $OS_NAME == "macos" ]]; then
brew update-reset && brew update
if [[ $R_BUILD_TYPE == "cran" ]]; then
brew install automake
brew install automake || exit -1
fi
brew install \
checkbashisms \
qpdf
brew install --cask basictex
qpdf || exit -1
brew install --cask basictex || exit -1
export PATH="/Library/TeX/texbin:$PATH"
sudo tlmgr --verify-repo=none update --self
sudo tlmgr --verify-repo=none install inconsolata helvetic
sudo tlmgr --verify-repo=none update --self || exit -1
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 \
-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.
# See https://github.com/r-lib/actions/issues/412.