Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
03ce02aa
Unverified
Commit
03ce02aa
authored
Mar 27, 2020
by
James Lamb
Committed by
GitHub
Mar 27, 2020
Browse files
[ci] changed CRAN mirror to fix failing installs (#2954)
parent
c870c57a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
.ci/test.sh
.ci/test.sh
+1
-0
.ci/test_r_package.sh
.ci/test_r_package.sh
+2
-2
No files found.
.ci/test.sh
View file @
03ce02aa
...
@@ -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"
...
...
.ci/test_r_package.sh
View file @
03ce02aa
#!/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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment