From d4d95e1a4aea7b8adfeb07c212325fa406155171 Mon Sep 17 00:00:00 2001 From: pat-s Date: Wed, 28 Aug 2024 18:38:25 +0200 Subject: [PATCH] process all package updates since build start --- .woodpecker/process_cran_updates.yaml | 14 +++++++------- R/process_cran_updates.R | 5 ++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.woodpecker/process_cran_updates.yaml b/.woodpecker/process_cran_updates.yaml index 7d23f82..e766ac8 100644 --- a/.woodpecker/process_cran_updates.yaml +++ b/.woodpecker/process_cran_updates.yaml @@ -7,9 +7,9 @@ skip_clone: true matrix: include: - PLATFORM: redhat-9 - # - PLATFORM: redhat-8 - # - PLATFORM: ubuntu-2404 - # - PLATFORM: ubuntu-2204 + - PLATFORM: redhat-8 + - PLATFORM: ubuntu-2404 + - PLATFORM: ubuntu-2204 steps: - name: 'Processing Updates: (${PLATFORM})' secrets: [red_hat_dev_pw, aws_access_key_id, aws_secret_access_key, pgpass, git_ro_token, GITHUB_PAT] @@ -41,17 +41,17 @@ 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 = 4, 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}]; pkgs = setdiff(pkgs, c("biplotbootGUI", "cncaGUI", "dynBiplotGUI", "ade4TkGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA" , "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM")); library(rBinaries); future::plan("sequential"); process_cran_updates(interval = lubridate::today() - 2, platform = "${PLATFORM}")' + - R -q -e 'options(crayon.enabled = TRUE, Ncpus = 4, 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}]; pkgs = setdiff(pkgs, c("biplotbootGUI", "cncaGUI", "dynBiplotGUI", "ade4TkGUI", "BlockmodelingGUI", "cncaGUI", "EventDetectGUI", "irtGUI", "KappaGUI", "magickGUI", "miniGUI", "multibiplotGUI", "TextMiningGUI", "later", "RclusTool", "Rcmdr", "RcmdrMisc", "RcmdrPlugin.aRnova", "RcmdrPlugin.BiclustGUI", "RcmdrPlugin.BWS1", "RcmdrPlugin.BWS2", "RcmdrPlugin.BWS3", "RcmdrPlugin.cpd", "RcmdrPlugin.DCCV", "RcmdrPlugin.DCE", "RcmdrPlugin.depthTools", "RcmdrPlugin.DoE", "RcmdrPlugin.EACSPIR", "RcmdrPlugin.EBM", "RcmdrPlugin.EcoVirtual", "RcmdrPlugin.Export", "RcmdrPlugin.EZR", "RcmdrPlugin.FactoMineR", "RcmdrPlugin.GWRM", "RcmdrPlugin.HH", "RcmdrPlugin.KMggplot2", "RcmdrPlugin.MA", "RcmdrPlugin.MPAStats", "RcmdrPlugin.NMBU", "RcmdrPlugin.orloca", "RcmdrPlugin.PcaRobust", "RcmdrPlugin.RiskDemo", "RcmdrPlugin.RMTCJags", "RcmdrPlugin.ROC", "RcmdrPlugin.sos" , "RcmdrPlugin.survival", "RcmdrPlugin.TeachingDemos", "RcmdrPlugin.TeachStat", "RcmdrPlugin.temis", "RcmdrPlugin.UCA" , "RcmdrPlugin.WorldFlora", "sf", "StratigrapheR", "tcltk2", "TVMM", "uHMM")); library(rBinaries); future::plan("sequential"); process_cran_updates(interval = lubridate::interval(lubridate::today() - 28, lubridate::today() - 1), platform = "${PLATFORM}")' backend_options: kubernetes: ### PROD resources: requests: - memory: 4Gi + memory: 10Gi cpu: 1000m limits: - memory: 13Gi - cpu: 1000m + memory: 14Gi + cpu: 4000m # DEBUG # resources: # requests: diff --git a/R/process_cran_updates.R b/R/process_cran_updates.R index 0c38d44..8e57b7e 100644 --- a/R/process_cran_updates.R +++ b/R/process_cran_updates.R @@ -31,7 +31,7 @@ process_cran_updates <- function( all_pkgs <- dplyr::bind_rows(updated_pkgs, new_pkgs) - # purrr::walk2(all_pkgs$name, all_pkgs$version, ~ build_binary_package(.x, .y, platform = platform)) + purrr::walk2(all_pkgs$name, all_pkgs$version, ~ build_binary_package(.x, .y, platform = platform)) if (prune) { removed_pkgs <- get_removed_cran_packages(interval) @@ -60,11 +60,10 @@ process_cran_updates <- function( files_filtered <- grep(sprintf("%s_", .x), files, value = TRUE) if (length(files_filtered > 0)) { s3fs::s3_file_delete(files_filtered) + cli::cli_alert_success("{.fun process_cran_updates}: Successfully removed {.pkg {basename(files_filtered)}} from S3.") } else { cli::cli_alert("{.fun process_cran_updates}: No tarballs found for package {.pkg {.x}} - already removed?") } - - cli::cli_alert_success("{.fun process_cran_updates}: Successfully removed {.pkg {basename(files_filtered)}} from S3.") }) } }