From f47835fb8d9a63380e0323f505627c8bbc7f1470 Mon Sep 17 00:00:00 2001 From: pat-s Date: Mon, 29 Jul 2024 16:16:43 +0200 Subject: [PATCH] normal run again --- .woodpecker/build.yaml | 28 +++++++++++++++------------- R/build_binaries.R | 2 ++ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index f14fba4..657795f 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -6,7 +6,7 @@ skip_clone: true matrix: include: - PLATFORM: rhel-9 - BLOCK: 903:920 + BLOCK: 903:1450 # - PLATFORM: rhel-9 # BLOCK: 1051:1450 # - PLATFORM: rhel-9 @@ -46,23 +46,25 @@ steps: # more complicated system dependencies which pak cannot resolve - mkdir -p /mnt/cache/pkgcache /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages # set additional repos: important as otherwise some packages cannot be resolved (e.g. INLA). Also: setting our own binary repos so we can make use of them for dep installation at some point - - R -q -e 'options(crayon.enabled = TRUE, Ncpus = 6, future.globals.onReference = "error", repos = structure(c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"))); pkgs = tools::CRAN_package_db()[[1]][${BLOCK}]; 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 = TRUE, force = TRUE))' + - R -q -e 'options(crayon.enabled = TRUE, Ncpus = 6, future.globals.onReference = "error", repos = structure(c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"))); pkgs = tools::CRAN_package_db()[[1]][${BLOCK}]; 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))' backend_options: kubernetes: - # resources: - # requests: - # memory: 25Gi - # cpu: 12000m - # limits: - # memory: 28Gi - # cpu: 16000m + ### PROD resources: requests: - memory: 4Gi - cpu: 2000m + memory: 25Gi + cpu: 12000m limits: - memory: 4Gi - cpu: 2000m + memory: 28Gi + cpu: 16000m + ## DEBUG + # resources: + # requests: + # memory: 4Gi + # cpu: 2000m + # limits: + # memory: 4Gi + # cpu: 2000m nodeSelector: kubernetes.io/arch: 'arm64' - name: Upload PACKAGES files diff --git a/R/build_binaries.R b/R/build_binaries.R index 1ccd469..154f6cd 100644 --- a/R/build_binaries.R +++ b/R/build_binaries.R @@ -93,6 +93,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL, p() dump <- build_single_tag(x, y, dir_out_bin, local_clone_dir, platform = platform, debug = debug) store_build_metadata(x, y, platform, error_occurred = FALSE, force = force) + cli::cli_alert_success("Successfully built package {.pkg {x}} with tag {.field {y}}.") con <- DBI::dbConnect(RPostgres::Postgres(), dbname = "build_metadata", host = "postgres-arm-binaries-r.devxy.io", @@ -122,6 +123,7 @@ build_binary_package <- function(package_name, tag = NULL, codename = NULL, { p() dump <- upload_single_binary_to_s3(package_name = x, tag = y, force = force, build_for_minor = build_for_minor, debug = debug) + cli::cli_alert_success("Successfully uploaded package {.pkg {x}} with tag {.field {y}}.") }, error = function(e) { message(sprintf("Error in uploading package %s with tag %s: %s", x, y, e))