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
0ebbf1e4
"...git@developer.sourcefind.cn:modelzoo/rtmdet_mmcv.git" did not exist on "ff793569442f38a056eeec976a0aa737dbe56b29"
Unverified
Commit
0ebbf1e4
authored
May 22, 2022
by
James Lamb
Committed by
GitHub
May 22, 2022
Browse files
[ci] switch CRAN mirror to RStudio (#5230)
parent
c000b8cc
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
.ci/test_r_package.sh
.ci/test_r_package.sh
+4
-4
.ci/test_r_package_valgrind.sh
.ci/test_r_package_valgrind.sh
+1
-1
.ci/test_r_package_windows.ps1
.ci/test_r_package_windows.ps1
+2
-2
.github/workflows/r_package.yml
.github/workflows/r_package.yml
+2
-2
.github/workflows/static_analysis.yml
.github/workflows/static_analysis.yml
+1
-1
.vsts-ci.yml
.vsts-ci.yml
+1
-1
No files found.
.ci/test_r_package.sh
View file @
0ebbf1e4
#!/bin/bash
#!/bin/bash
# set up R environment
# set up R environment
CRAN_MIRROR
=
"https://c
loud.r-project.org/
"
CRAN_MIRROR
=
"https://c
ran.rstudio.com
"
R_LIB_PATH
=
~/Rlib
R_LIB_PATH
=
~/Rlib
mkdir
-p
$R_LIB_PATH
mkdir
-p
$R_LIB_PATH
export
R_LIBS
=
$R_LIB_PATH
export
R_LIBS
=
$R_LIB_PATH
...
@@ -17,12 +17,12 @@ fi
...
@@ -17,12 +17,12 @@ fi
R_MAJOR_VERSION
=(
${
R_VERSION
//./
}
)
R_MAJOR_VERSION
=(
${
R_VERSION
//./
}
)
if
[[
"
${
R_MAJOR_VERSION
}
"
==
"3"
]]
;
then
if
[[
"
${
R_MAJOR_VERSION
}
"
==
"3"
]]
;
then
export
R_MAC_VERSION
=
3.6.3
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_MAC_PKG_URL
=
${
CRAN_MIRROR
}
/bin/macosx/R-
${
R_MAC_VERSION
}
.pkg
export
R_LINUX_VERSION
=
"3.6.3-1bionic"
export
R_LINUX_VERSION
=
"3.6.3-1bionic"
export
R_APT_REPO
=
"bionic-cran35/"
export
R_APT_REPO
=
"bionic-cran35/"
elif
[[
"
${
R_MAJOR_VERSION
}
"
==
"4"
]]
;
then
elif
[[
"
${
R_MAJOR_VERSION
}
"
==
"4"
]]
;
then
export
R_MAC_VERSION
=
4.1.3
export
R_MAC_VERSION
=
4.1.3
export
R_MAC_PKG_URL
=
https://cran.r-project.org
/bin/macosx/base/R-
${
R_MAC_VERSION
}
.pkg
export
R_MAC_PKG_URL
=
${
CRAN_MIRROR
}
/bin/macosx/base/R-
${
R_MAC_VERSION
}
.pkg
export
R_LINUX_VERSION
=
"4.1.3-1.2004.0"
export
R_LINUX_VERSION
=
"4.1.3-1.2004.0"
export
R_APT_REPO
=
"focal-cran40/"
export
R_APT_REPO
=
"focal-cran40/"
else
else
...
@@ -40,7 +40,7 @@ if [[ $OS_NAME == "linux" ]]; then
...
@@ -40,7 +40,7 @@ if [[ $OS_NAME == "linux" ]]; then
--keyserver
keyserver.ubuntu.com
\
--keyserver
keyserver.ubuntu.com
\
--recv-keys
E298A3A825C0D65DFD57CBB651716619E084DAB9
--recv-keys
E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo
add-apt-repository
\
sudo
add-apt-repository
\
"deb
https://cloud.r-project.org
/bin/linux/ubuntu
${
R_APT_REPO
}
"
"deb
${
CRAN_MIRROR
}
/bin/linux/ubuntu
${
R_APT_REPO
}
"
sudo
apt-get update
sudo
apt-get update
sudo
apt-get
install
\
sudo
apt-get
install
\
--no-install-recommends
\
--no-install-recommends
\
...
...
.ci/test_r_package_valgrind.sh
View file @
0ebbf1e4
#!/bin/bash
#!/bin/bash
RDscriptvalgrind
-e
"install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'testthat'), repos = 'https://cran.r
-project.org
', Ncpus = parallel::detectCores())"
||
exit
-1
RDscriptvalgrind
-e
"install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'testthat'), repos = 'https://cran.r
studio.com
', Ncpus = parallel::detectCores())"
||
exit
-1
sh build-cran-package.sh
\
sh build-cran-package.sh
\
--r-executable
=
RDvalgrind
\
--r-executable
=
RDvalgrind
\
||
exit
-1
||
exit
-1
...
...
.ci/test_r_package_windows.ps1
View file @
0ebbf1e4
...
@@ -87,7 +87,7 @@ if ($env:R_MAJOR_VERSION -eq "3") {
...
@@ -87,7 +87,7 @@ if ($env:R_MAJOR_VERSION -eq "3") {
$
env
:
R_LIB_PATH
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/RLibrary"
-replace
'[\\]'
,
'/'
$
env
:
R_LIB_PATH
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/RLibrary"
-replace
'[\\]'
,
'/'
$
env
:
R_LIBS
=
"
$
env
:
R_LIB_PATH
"
$
env
:
R_LIBS
=
"
$
env
:
R_LIB_PATH
"
$
env
:
PATH
=
"
$
env
:
RTOOLS_BIN
;"
+
"
$
env
:
RTOOLS_MINGW_BIN
;"
+
"
$
env
:
R_LIB_PATH
/R/bin/x64;"
+
"
$
env
:
R_LIB_PATH
/miktex/texmfs/install/miktex/bin/x64;"
+
$
env
:
PATH
$
env
:
PATH
=
"
$
env
:
RTOOLS_BIN
;"
+
"
$
env
:
RTOOLS_MINGW_BIN
;"
+
"
$
env
:
R_LIB_PATH
/R/bin/x64;"
+
"
$
env
:
R_LIB_PATH
/miktex/texmfs/install/miktex/bin/x64;"
+
$
env
:
PATH
$
env
:
CRAN_MIRROR
=
"https://c
loud.r-project.org/
"
$
env
:
CRAN_MIRROR
=
"https://c
ran.rstudio.com
"
$
env
:
CTAN_MIRROR
=
"https://ctan.math.illinois.edu/systems/win32/miktex"
$
env
:
CTAN_MIRROR
=
"https://ctan.math.illinois.edu/systems/win32/miktex"
$
env
:
CTAN_PACKAGE_ARCHIVE
=
"
$
env
:
CTAN_MIRROR
/tm/packages/"
$
env
:
CTAN_PACKAGE_ARCHIVE
=
"
$
env
:
CTAN_MIRROR
/tm/packages/"
$
env
:
MIKTEX_EXCEPTION_PATH
=
"
$
env
:
TEMP
\miktex"
$
env
:
MIKTEX_EXCEPTION_PATH
=
"
$
env
:
TEMP
\miktex"
...
@@ -109,7 +109,7 @@ tzutil /s "GMT Standard Time"
...
@@ -109,7 +109,7 @@ tzutil /s "GMT Standard Time"
# download R and RTools
# download R and RTools
Write-Output
"Downloading R and Rtools"
Write-Output
"Downloading R and Rtools"
Download-File-With-Retries
-url
"
https://cran.r-project.org
/bin/windows/base/old/
$
env
:
R_WINDOWS_VERSION
/R-
$
env
:
R_WINDOWS_VERSION
-win.exe"
-destfile
"R-win.exe"
Download-File-With-Retries
-url
"
$
env
:
CRAN_MIRROR
/bin/windows/base/old/
$
env
:
R_WINDOWS_VERSION
/R-
$
env
:
R_WINDOWS_VERSION
-win.exe"
-destfile
"R-win.exe"
Download-File-With-Retries
-url
"https://github.com/microsoft/LightGBM/releases/download/v2.0.12/
$
env
:
RTOOLS_EXE_FILE
"
-destfile
"Rtools.exe"
Download-File-With-Retries
-url
"https://github.com/microsoft/LightGBM/releases/download/v2.0.12/
$
env
:
RTOOLS_EXE_FILE
"
-destfile
"Rtools.exe"
# Install R
# Install R
...
...
.github/workflows/r_package.yml
View file @
0ebbf1e4
...
@@ -191,7 +191,7 @@ jobs:
...
@@ -191,7 +191,7 @@ jobs:
-
name
:
Install packages
-
name
:
Install packages
shell
:
bash
shell
:
bash
run
:
|
run
:
|
RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'testthat'), repos = 'https://cran.r
-project.org
', Ncpus = parallel::detectCores())"
RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'testthat'), repos = 'https://cran.r
studio.com
', Ncpus = parallel::detectCores())"
sh build-cran-package.sh --r-executable=RD${{ matrix.r_customization }}
sh build-cran-package.sh --r-executable=RD${{ matrix.r_customization }}
RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit -1
RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit -1
-
name
:
Run tests with sanitizers
-
name
:
Run tests with sanitizers
...
@@ -225,7 +225,7 @@ jobs:
...
@@ -225,7 +225,7 @@ jobs:
shell
:
bash
shell
:
bash
run
:
|
run
:
|
export PATH=/opt/R-devel/bin/:${PATH}
export PATH=/opt/R-devel/bin/:${PATH}
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'testthat'), repos = 'https://cran.r
-project.org
', Ncpus = parallel::detectCores())"
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'testthat'), repos = 'https://cran.r
studio.com
', Ncpus = parallel::detectCores())"
sh build-cran-package.sh
sh build-cran-package.sh
R CMD check --as-cran --run-donttest lightgbm_*.tar.gz || exit -1
R CMD check --as-cran --run-donttest lightgbm_*.tar.gz || exit -1
if grep -q -E "NOTE|WARNING|ERROR" lightgbm.Rcheck/00check.log; then
if grep -q -E "NOTE|WARNING|ERROR" lightgbm.Rcheck/00check.log; then
...
...
.github/workflows/static_analysis.yml
View file @
0ebbf1e4
...
@@ -60,7 +60,7 @@ jobs:
...
@@ -60,7 +60,7 @@ jobs:
-
name
:
Install packages
-
name
:
Install packages
shell
:
bash
shell
:
bash
run
:
|
run
:
|
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'roxygen2', 'testthat'), repos = 'https://cran.r
-project.org
', Ncpus = parallel::detectCores())"
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown', 'roxygen2', 'testthat'), repos = 'https://cran.r
studio.com
', Ncpus = parallel::detectCores())"
sh build-cran-package.sh || exit -1
sh build-cran-package.sh || exit -1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit -1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit -1
-
name
:
Test documentation
-
name
:
Test documentation
...
...
.vsts-ci.yml
View file @
0ebbf1e4
...
@@ -317,7 +317,7 @@ jobs:
...
@@ -317,7 +317,7 @@ jobs:
R_LIB_PATH=~/Rlib
R_LIB_PATH=~/Rlib
export R_LIBS=${R_LIB_PATH}
export R_LIBS=${R_LIB_PATH}
mkdir -p ${R_LIB_PATH}
mkdir -p ${R_LIB_PATH}
RDscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown'), lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r
-project.org
', Ncpus = parallel::detectCores())" || exit -1
RDscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl', 'rmarkdown'), lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.r
studio.com
', Ncpus = parallel::detectCores())" || exit -1
sh build-cran-package.sh --r-executable=RD || exit -1
sh build-cran-package.sh --r-executable=RD || exit -1
mv lightgbm_${LGB_VER}.tar.gz $(Build.ArtifactStagingDirectory)/lightgbm-${LGB_VER}-r-cran.tar.gz
mv lightgbm_${LGB_VER}.tar.gz $(Build.ArtifactStagingDirectory)/lightgbm-${LGB_VER}-r-cran.tar.gz
displayName
:
'
Build
CRAN
R-package'
displayName
:
'
Build
CRAN
R-package'
...
...
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