Skip to content

Commit

Permalink
use r image. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jan 16, 2025
1 parent 4d08c07 commit dbfa528
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions doc/R-package/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*~
*.md
2 changes: 2 additions & 0 deletions doc/R-package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ PKGROOT=../../R-package
xgboostfromJSON.md: $(PKGROOT)/vignettes/xgboostfromJSON.Rmd
xgboost_introduction.md: $(PKGROOT)/vignettes/xgboost_introduction.Rmd

all: xgboostfromJSON.md xgboost_introduction.md

# General Rules for build rmarkdowns, need knitr
%.md:
Rscript -e \
Expand Down
17 changes: 9 additions & 8 deletions ops/pipeline/build-r-docs-impl.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ set -euo pipefail

branch_name=$1

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

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
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
gosu root chown -R $UID:$GROUPS ${R_LIBS_USER}

sudo apt install --no-install-recommends r-base
Rscript -e "install.packages(c('pkgdown'), repos = 'https://mirror.las.iastate.edu/CRAN/')"
cd R-package
Rscript -e "pkgdown::build_site()"
MAKEFLAGS=-j$(nproc) Rscript ./tests/helper_scripts/install_deps.R
MAKEFLAGS=-j$(nproc) Rscript -e "pkgdown::build_site()"
cd -
tar cvjf r-docs-${branch_name}.tar.bz2 R-package/docs

cd doc/R-package
make -j$(nproc) all

tar cvjf r-docs-${branch_name}.tar.bz2 R-package/docs doc/R-package/xgboost_introduction.md doc/R-package/xgboostfromJSON.md
2 changes: 1 addition & 1 deletion ops/pipeline/build-r-docs.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

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

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

echo "--- Build R package doc"
set -x
Expand Down

0 comments on commit dbfa528

Please sign in to comment.