Unverified Commit 03ce02aa authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] changed CRAN mirror to fix failing installs (#2954)

parent c870c57a
...@@ -47,6 +47,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "lint" ]]; then ...@@ -47,6 +47,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "lint" ]]; then
r-stringi # stringi needs to be installed separate from r-lintr to avoid issues like 'unable to load shared object stringi.so' r-stringi # stringi needs to be installed separate from r-lintr to avoid issues like 'unable to load shared object stringi.so'
conda install -q -y -n $CONDA_ENV \ conda install -q -y -n $CONDA_ENV \
-c conda-forge \ -c conda-forge \
libxml2 \
r-lintr>=2.0 r-lintr>=2.0
pip install --user cpplint pip install --user cpplint
echo "Linting Python code" echo "Linting Python code"
......
#!/bin/bash #!/bin/bash
# set up R environment # set up R environment
CRAN_MIRROR="https://cloud.r-project.org/"
R_LIB_PATH=~/Rlib R_LIB_PATH=~/Rlib
mkdir -p $R_LIB_PATH mkdir -p $R_LIB_PATH
echo "R_LIBS=$R_LIB_PATH" > ${HOME}/.Renviron echo "R_LIBS=$R_LIB_PATH" > ${HOME}/.Renviron
echo 'options(repos = "https://cran.rstudio.com")' > ${HOME}/.Rprofile
export PATH="$R_LIB_PATH/R/bin:$PATH" export PATH="$R_LIB_PATH/R/bin:$PATH"
# installing precompiled R for Ubuntu # installing precompiled R for Ubuntu
...@@ -69,7 +69,7 @@ packages="c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat')" ...@@ -69,7 +69,7 @@ packages="c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat')"
if [[ $OS_NAME == "macos" ]]; then if [[ $OS_NAME == "macos" ]]; then
packages+=", type = 'binary'" packages+=", type = 'binary'"
fi fi
Rscript -e "install.packages(${packages})" || exit -1 Rscript --vanilla -e "install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}')" || exit -1
cd ${BUILD_DIRECTORY} cd ${BUILD_DIRECTORY}
Rscript build_r.R || exit -1 Rscript build_r.R || exit -1
......
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