start with fresh packages dir
This commit is contained in:
parent
a4b2e9595d
commit
d387232ef3
2 changed files with 10 additions and 4 deletions
|
|
@ -10,6 +10,7 @@ matrix:
|
|||
- PLATFORM: redhat-8
|
||||
- PLATFORM: ubuntu-2404
|
||||
- PLATFORM: ubuntu-2204
|
||||
# - PLATFORM: alpine-320
|
||||
steps:
|
||||
- name: Upload PACKAGES files
|
||||
secrets: [red_hat_dev_pw, aws_access_key_id, aws_secret_access_key, pgpass, git_ro_token, GITHUB_PAT]
|
||||
|
|
@ -26,6 +27,7 @@ steps:
|
|||
# download latest package version (avoid having to rebuild image every time)
|
||||
# rscript_startup arg: required to pass down global option to future workers https://github.com/HenrikBengtsson/future/issues/134#issuecomment-2245666169
|
||||
- git clone https://pat-s:$$git_ro_token@git.devxy.io/devxy/arm64-r-binaries.git .
|
||||
- rm -rf /mnt/cache/packages/*
|
||||
- R -q -e 'devtools::install(); packageVersion("rBinaries")'
|
||||
- R -q -e 'pak::pak(c("dyfanjones/s3fs", "pat-s/desc@description-from-remote", "pat-s/cranlike@s3"))'
|
||||
- cd /mnt/cache/packages
|
||||
|
|
@ -34,10 +36,10 @@ steps:
|
|||
kubernetes:
|
||||
resources:
|
||||
requests:
|
||||
memory: 2000Mi
|
||||
memory: 4000Mi
|
||||
cpu: 0m
|
||||
limits:
|
||||
memory: 3000Mi
|
||||
memory: 10000Mi
|
||||
cpu: 1000m
|
||||
nodeSelector:
|
||||
kubernetes.io/arch: 'arm64'
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ upload_package_index <- function(
|
|||
codename = NULL, r_minor_version = NULL,
|
||||
build_for_minor = FALSE,
|
||||
debug = FALSE) {
|
||||
cli::cli_alert("{.fun upload_package_index}: Uploading PACKAGES* files to S3.")
|
||||
cli::cli_alert("{.fun upload_package_index}: Updating PACKAGES* files in S3.")
|
||||
|
||||
codename <- set_codename(codename)
|
||||
if (is.null(r_minor_version)) {
|
||||
|
|
@ -76,13 +76,17 @@ upload_package_index <- function(
|
|||
region_name = region,
|
||||
)
|
||||
|
||||
cli::cli_alert("{.fun upload_package_index}: Started listing remote packages")
|
||||
pkgs <- s3fs::s3_dir_ls(remote_bin_dir)
|
||||
cli::cli_alert_success("{.fun upload_package_index}: Finished listing remote packages")
|
||||
# We remove 4 from the count as we don't want to count the PACKAGES* files
|
||||
pkg_count <- length(pkgs) - 4
|
||||
unique_pkgs <- length(unique(sapply(strsplit(basename(pkgs), "_"), function(x) x[1])))
|
||||
|
||||
t1 <- Sys.time()
|
||||
cranlike::update_PACKAGES(sprintf("s3://%s", remote_bin_dir))
|
||||
total_build_time <- round(Sys.time() - t1, 2)
|
||||
cli::cli_alert("Time updating PACKAGES index for {.field {pkg_count}} ({.field {unique_pkgs}} unique) packages: {.strong {total_build_time} {units(difftime(Sys.time(), t1))}}.")
|
||||
cli::cli_alert("{.fun upload_package_index}: Time updating PACKAGES index for {.field {pkg_count}} ({.field {unique_pkgs}} unique) packages: {.strong {total_build_time} {units(difftime(Sys.time(), t1))}}.")
|
||||
|
||||
purrr::walk2(
|
||||
c("PACKAGES", "PACKAGES.db", "PACKAGES.rds", "PACKAGES.gz"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue