Skip to content

Commit

Permalink
[ci] prefer older binary to new source for R packages on Mac builds (f…
Browse files Browse the repository at this point in the history
…ixes #4008) (#4010)

* [ci] prefer older binary to new source for R packages

* back to binary

* preserve choice on Linux
  • Loading branch information
jameslamb authored Feb 21, 2021
1 parent 646267d commit b1d382e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .ci/test_r_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 'both'"
packages+=", type = 'binary'"
compile_from_source="never"
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 = '${compile_from_source}'); install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'))" || exit -1

cd ${BUILD_DIRECTORY}

Expand Down

0 comments on commit b1d382e

Please sign in to comment.