adjust resources, add ccache

This commit is contained in:
Patrick Schratz 2024-07-27 18:58:37 +02:00
commit 49b399bcad
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -25,6 +25,7 @@ steps:
# set the location of the 'pkgcache' cache dir which persists the R package dependencies needed to install the packages themselves # set the location of the 'pkgcache' cache dir which persists the R package dependencies needed to install the packages themselves
R_PKG_CACHE_DIR: /mnt/cache/pkgcache R_PKG_CACHE_DIR: /mnt/cache/pkgcache
R_LIBS_USER: /mnt/cache/R-pkgs R_LIBS_USER: /mnt/cache/R-pkgs
CCACHE_DIR: /mnt/cache/ccache
volumes: volumes:
- arm-binaries-r-dep-cache-rhel9:/mnt/cache - arm-binaries-r-dep-cache-rhel9:/mnt/cache
commands: commands:
@ -34,19 +35,20 @@ steps:
- rm -rf /mnt/cache/R-pkgs/00LOCK-arm64-r-binaries - rm -rf /mnt/cache/R-pkgs/00LOCK-arm64-r-binaries
- R -q -e 'pak::pak("dyfanjones/s3fs")' - R -q -e 'pak::pak("dyfanjones/s3fs")'
- R -q -e 'install.packages(".", repos = NULL, quiet = FALSE); packageVersion("rBinaries")' - R -q -e 'install.packages(".", repos = NULL, quiet = FALSE); packageVersion("rBinaries")'
- mkdir /root/.R && echo -e "CXX_STD = CXX14\nCC=ccache gcc\nCPP=ccache gcc\nCXX=ccache g++\nCXX11=ccache g++\nCXX14=ccache g++\nCXX17=ccache g++\nF77=ccache /usr/bin/gfortran\nFC=ccache /usr/bin/gfortran" > /root/.R/Makevars
# manually install some packages into the cache so that some builds don't fail # manually install some packages into the cache so that some builds don't fail
# Hmisc -> ABCanalysis # Hmisc -> ABCanalysis
- R -q -e 'pak::pak(c("Hmisc", "pls", "abd", "doRNG"))' - R -q -e 'pak::pak(c("Hmisc", "pls", "abd", "doRNG"))'
- mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/binaries - mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/binaries /mnt/cache/ccache
- R -q -e 'options(crayon.enabled = TRUE, Ncpus = 6, future.globals.onReference = "error"); pkgs = tools::CRAN_package_db()[[1]][20:40]; library(rBinaries); future::plan("multisession", workers = 6, rscript_startup = quote(options(crayon.enabled = TRUE))); foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE))' - R -q -e 'options(crayon.enabled = TRUE, Ncpus = 6, future.globals.onReference = "error"); pkgs = tools::CRAN_package_db()[[1]][20:40]; library(rBinaries); future::plan("multisession", workers = 3, rscript_startup = quote(options(crayon.enabled = TRUE))); foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE))'
backend_options: backend_options:
kubernetes: kubernetes:
resources: resources:
requests: requests:
memory: 3000Mi memory: 5000Mi
cpu: 2000m cpu: 3000m
limits: limits:
memory: 4000Mi memory: 6000Mi
cpu: 6050m cpu: 6050m
nodeSelector: nodeSelector:
kubernetes.io/arch: 'arm64' kubernetes.io/arch: 'arm64'