From 8686c91b7c8061275231e5f89ce98b5470471e39 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 4 Apr 2022 20:13:24 -0500 Subject: [PATCH 1/2] [ci] fail CI jobs earlier when installations fail --- .ci/test_r_package.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 1a96d4b4c51e..89ddcde44bcf 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -66,20 +66,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 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. From 43d60f658d6103c98dcbd516a28fb8ff31489eb6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 4 Apr 2022 20:54:39 -0500 Subject: [PATCH 2/2] more reliable link for R.pkg --- .ci/test_r_package.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 89ddcde44bcf..a6d6a0b475b0 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -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 @@ -76,7 +78,7 @@ if [[ $OS_NAME == "macos" ]]; then 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 / || exit -1