Skip to content

Commit dbfa528

Browse files
committed
use r image. [skip ci]
1 parent 4d08c07 commit dbfa528

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

doc/R-package/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*~
2+
*.md

doc/R-package/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ PKGROOT=../../R-package
55
xgboostfromJSON.md: $(PKGROOT)/vignettes/xgboostfromJSON.Rmd
66
xgboost_introduction.md: $(PKGROOT)/vignettes/xgboost_introduction.Rmd
77

8+
all: xgboostfromJSON.md xgboost_introduction.md
9+
810
# General Rules for build rmarkdowns, need knitr
911
%.md:
1012
Rscript -e \

ops/pipeline/build-r-docs-impl.sh

100644100755
+9-8
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ set -euo pipefail
1010

1111
branch_name=$1
1212

13-
# See instructions at: https://cran.r-project.org/bin/linux/ubuntu/
13+
echo "R_LIBS_USER: ${R_LIBS_USER}"
1414

15-
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
16-
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
17-
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
15+
gosu root chown -R $UID:$GROUPS ${R_LIBS_USER}
1816

19-
sudo apt install --no-install-recommends r-base
20-
Rscript -e "install.packages(c('pkgdown'), repos = 'https://mirror.las.iastate.edu/CRAN/')"
2117
cd R-package
22-
Rscript -e "pkgdown::build_site()"
18+
MAKEFLAGS=-j$(nproc) Rscript ./tests/helper_scripts/install_deps.R
19+
MAKEFLAGS=-j$(nproc) Rscript -e "pkgdown::build_site()"
2320
cd -
24-
tar cvjf r-docs-${branch_name}.tar.bz2 R-package/docs
21+
22+
cd doc/R-package
23+
make -j$(nproc) all
24+
25+
tar cvjf r-docs-${branch_name}.tar.bz2 R-package/docs doc/R-package/xgboost_introduction.md doc/R-package/xgboostfromJSON.md

ops/pipeline/build-r-docs.sh

100644100755
+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010

1111
source ops/pipeline/get-docker-registry-details.sh
1212

13-
IMAGE_URI=${DOCKER_REGISTRY_URL}/xgb-ci.cpu
13+
IMAGE_URI=${DOCKER_REGISTRY_URL}/xgb-ci.gpu_build_r_rockylinux8
1414

1515
echo "--- Build R package doc"
1616
set -x

0 commit comments

Comments
 (0)