From 7524648a493fdcd6f0199b85e62b2323e5b0b316 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 21 Feb 2021 15:28:48 -0600 Subject: [PATCH 1/3] [ci] prefer older binary to new source for R packages --- .ci/test_r_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index 20127ca71219..dbaa4d184303 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -103,7 +103,7 @@ packages="c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat')" if [[ $OS_NAME == "macos" ]]; then packages+=", type = 'both'" fi -Rscript --vanilla -e "options(install.packages.compile.from.source = 'both'); install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'))" || exit -1 +Rscript --vanilla -e "options(install.packages.compile.from.source = 'never'); install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'))" || exit -1 cd ${BUILD_DIRECTORY} From 599c77b3847b71ad53dcb5f1074472d612072257 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 21 Feb 2021 15:34:26 -0600 Subject: [PATCH 2/3] back to binary --- .ci/test_r_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/test_r_package.sh b/.ci/test_r_package.sh index dbaa4d184303..47deb2444ec1 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -101,7 +101,7 @@ fi # to avoid a CI-time dependency on devtools (for devtools::install_deps()) packages="c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat')" if [[ $OS_NAME == "macos" ]]; then - packages+=", type = 'both'" + packages+=", type = 'binary'" fi Rscript --vanilla -e "options(install.packages.compile.from.source = 'never'); install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'))" || exit -1 From 968f43541c5dcd7212267122a0f94778fc6fda11 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 21 Feb 2021 15:40:17 -0600 Subject: [PATCH 3/3] preserve choice on Linux --- .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 47deb2444ec1..43f58c80c66d 100755 --- a/.ci/test_r_package.sh +++ b/.ci/test_r_package.sh @@ -100,10 +100,12 @@ fi # Manually install Depends and Imports libraries + 'testthat' # to avoid a CI-time dependency on devtools (for devtools::install_deps()) packages="c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat')" +compile_from_source="both" if [[ $OS_NAME == "macos" ]]; then packages+=", type = 'binary'" + compile_from_source="never" fi -Rscript --vanilla -e "options(install.packages.compile.from.source = 'never'); install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'))" || exit -1 +Rscript --vanilla -e "options(install.packages.compile.from.source = '${compile_from_source}'); install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'))" || exit -1 cd ${BUILD_DIRECTORY}