order code and skip clone
This commit is contained in:
parent
6f1b8dfa8d
commit
f1683f5855
2 changed files with 8 additions and 5 deletions
|
|
@ -1,6 +1,8 @@
|
|||
when:
|
||||
event: [push, manual]
|
||||
|
||||
skip_clone: true
|
||||
|
||||
# matrix:
|
||||
# include:
|
||||
# - PLATFORM: rhel-9
|
||||
|
|
@ -31,7 +33,7 @@ steps:
|
|||
commands:
|
||||
# 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 && cd arm64-r-binaries
|
||||
- git clone https://pat-s:$$git_ro_token@git.devxy.io/devxy/arm64-r-binaries.git .
|
||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-arm64-r-binaries
|
||||
- R -q -e 'pak::pak("dyfanjones/s3fs")'
|
||||
- R -q -e 'pak::local_install(); packageVersion("rBinaries")'
|
||||
|
|
@ -41,7 +43,8 @@ steps:
|
|||
- R -q -e 'Sys.setenv(PKG_SYSREQS = TRUE, PKG_SYSREQS_VERBOSE = TRUE, PKG_SYSREQS_PLATFORM = "redhat-9"); pak::pak(c("Hmisc", "pls", "abd", "doRNG", "devtools"))'
|
||||
# more complicated system dependencies which pak cannot resolve
|
||||
- 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]][26:40]; library(rBinaries); future::plan("multisession", workers = 5, rscript_startup = quote(options(crayon.enabled = TRUE))); foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE))'
|
||||
# set additional repos: important as otherwise some packages cannot be resolved (e.g. INLA)
|
||||
- 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]][29:40]; library(rBinaries); future::plan("multisession", workers = 5, 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:
|
||||
|
|
@ -67,9 +70,8 @@ steps:
|
|||
commands:
|
||||
# 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 && cd arm64-r-binaries
|
||||
- R -q -e 'pak::local_install(); packageVersion("rBinaries")'
|
||||
- R -q -e 'pak::pak("dyfanjones/s3fs")'
|
||||
- R -q -e 'pak::pak(c("dyfanjones/s3fs", "pat-s/desc@description-from-remote", "pat-s/cranlike@s3"))'
|
||||
- cd /mnt/cache/binaries/__linux__/rhel9/latest/src/contrib
|
||||
- R -q -e 'options(crayon.enabled = TRUE); library(rBinaries); upload_package_index()'
|
||||
backend_options:
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ upload_single_binary_to_s3 <- function(
|
|||
local_bin_path <- set_bin_path(r_minor_version, build_for_minor, local_build_root = local_build_root, codename)
|
||||
remote_bin_path <- set_bin_path(r_minor_version, build_for_minor, local_build_root = bucket, codename)
|
||||
|
||||
tarball_name <- sprintf("%s_%s.tar.gz", package_name, tag)
|
||||
|
||||
if (!file.exists(sprintf("%s/%s", local_bin_path, tarball_name))) {
|
||||
cli::cli_alert("{.fun upload_single_binary_to_s3}: File {.pkg {package_name}} {.field {tag}} does not exist locally - skipping upload.")
|
||||
return(TRUE)
|
||||
|
|
@ -36,7 +38,6 @@ upload_single_binary_to_s3 <- function(
|
|||
region_name = region,
|
||||
)
|
||||
|
||||
tarball_name <- sprintf("%s_%s.tar.gz", package_name, tag)
|
||||
exists <- s3fs::s3_file_exists(sprintf("%s/%s", remote_bin_path, tarball_name))
|
||||
|
||||
if ((!exists && !force) || (!exists && force)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue