From 49b399bcad1c591971efb480e4f60c4f6ebad7a7 Mon Sep 17 00:00:00 2001 From: pat-s Date: Sat, 27 Jul 2024 18:58:37 +0200 Subject: [PATCH] adjust resources, add ccache --- .woodpecker/build.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index 4f413d4..65b6676 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -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 R_PKG_CACHE_DIR: /mnt/cache/pkgcache R_LIBS_USER: /mnt/cache/R-pkgs + CCACHE_DIR: /mnt/cache/ccache volumes: - arm-binaries-r-dep-cache-rhel9:/mnt/cache commands: @@ -34,19 +35,20 @@ steps: - rm -rf /mnt/cache/R-pkgs/00LOCK-arm64-r-binaries - R -q -e 'pak::pak("dyfanjones/s3fs")' - 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 # Hmisc -> ABCanalysis - R -q -e 'pak::pak(c("Hmisc", "pls", "abd", "doRNG"))' - - mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/binaries - - 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))' + - 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 = 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: kubernetes: resources: requests: - memory: 3000Mi - cpu: 2000m + memory: 5000Mi + cpu: 3000m limits: - memory: 4000Mi + memory: 6000Mi cpu: 6050m nodeSelector: kubernetes.io/arch: 'arm64'