improve log
This commit is contained in:
parent
6df5857b13
commit
d1c8b8ba4d
3 changed files with 8 additions and 8 deletions
|
|
@ -24,7 +24,7 @@ steps:
|
||||||
# download latest package version (avoid having to rebuild image every time)
|
# download latest package version (avoid having to rebuild image every time)
|
||||||
- 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 && cd arm64-r-binaries
|
||||||
- R -q -e 'install.packages(".", repos = NULL, quiet = TRUE); packageVersion("rBinaries")'
|
- R -q -e 'install.packages(".", repos = NULL, quiet = TRUE); packageVersion("rBinaries")'
|
||||||
- R -q -e 'options(crayon.enabled = TRUE, Ncpus = 2); pkgs = tools::CRAN_package_db()[[1]][1:2]; library(rBinaries); future::plan("multicore", workers = 2); lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE))'
|
- R -q -e 'options(crayon.enabled = TRUE, Ncpus = 2); pkgs = tools::CRAN_package_db()[[1]][1:2]; library(rBinaries); future::plan("multicore", workers = 2); foo = lapply(pkgs, function(x) build_binary_package(x, build_for_minor=FALSE, debug = FALSE, force = TRUE))'
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ build_single_tag <- function(
|
||||||
platform,
|
platform,
|
||||||
dir_out_bin,
|
dir_out_bin,
|
||||||
local_clone_dir) {
|
local_clone_dir) {
|
||||||
cli::cli_alert_info("{.fun build_single_tag}: 1. Cloning package {.pkg {package_name}} with tag {.field {tag}}.")
|
cli::cli_alert_info("{.fun build_single_tag}: (1/4) Cloning package {.pkg {package_name}} with tag {.field {tag}}.")
|
||||||
|
|
||||||
local_clone_dir_single <- sprintf("%s/%s_%s", local_clone_dir, package_name, tag)
|
local_clone_dir_single <- sprintf("%s/%s_%s", local_clone_dir, package_name, tag)
|
||||||
|
|
||||||
|
|
@ -142,9 +142,9 @@ build_single_tag <- function(
|
||||||
))
|
))
|
||||||
|
|
||||||
if (file.exists(sprintf("%s/%s_%s.tar.gz", dir_out_bin, package_name, tag))) {
|
if (file.exists(sprintf("%s/%s_%s.tar.gz", dir_out_bin, package_name, tag))) {
|
||||||
cli::cli_alert_info("{.fun build_single_tag}: 2. Tarball for package {.pkg {package_name}} with tag {.field {tag}} already exists. Skipping build.")
|
cli::cli_alert_info("{.fun build_single_tag}: (2/4). Tarball for package {.pkg {package_name}} with tag {.field {tag}} already exists. Skipping build.")
|
||||||
} else {
|
} else {
|
||||||
cli::cli_alert_info("{.fun build_single_tag}: 2. Building package {.pkg {package_name}} with tag {.field {tag}}.")
|
cli::cli_alert_info("{.fun build_single_tag}: (2/4). Building package {.pkg {package_name}} with tag {.field {tag}}.")
|
||||||
|
|
||||||
t1 <- Sys.time()
|
t1 <- Sys.time()
|
||||||
dump <- pkgbuild::build(
|
dump <- pkgbuild::build(
|
||||||
|
|
@ -154,7 +154,7 @@ build_single_tag <- function(
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!file.exists(sprintf("%s/%s_%s.tar.gz", dir_out_bin, package_name, tag))) {
|
if (!file.exists(sprintf("%s/%s_%s.tar.gz", dir_out_bin, package_name, tag))) {
|
||||||
cli::cli_alert_info('{.fun build_single_tag}: 3. Moving package from {.path {sprintf("%s/%s*.tar.gz", dir_out_bin, package_name)}} to {.path {sprintf("%s/%s_%s.tar.gz", dir_out_bin, package_name, tag)}}')
|
cli::cli_alert_info('{.fun build_single_tag}: (3/4). Moving package from {.path {sprintf("%s/%s*.tar.gz", dir_out_bin, package_name)}} to {.path {sprintf("%s/%s_%s.tar.gz", dir_out_bin, package_name, tag)}}')
|
||||||
# remove _aarch64-unknown-linux-gnu part in filename
|
# remove _aarch64-unknown-linux-gnu part in filename
|
||||||
system2("rsync", args = c(
|
system2("rsync", args = c(
|
||||||
sprintf("%s/%s_%s*.tar.gz", dir_out_bin, package_name, tag),
|
sprintf("%s/%s_%s*.tar.gz", dir_out_bin, package_name, tag),
|
||||||
|
|
@ -165,7 +165,7 @@ build_single_tag <- function(
|
||||||
}
|
}
|
||||||
unlink(sprintf("%s/%s_%s_R*.tar.gz", dir_out_bin, package_name, tag))
|
unlink(sprintf("%s/%s_%s_R*.tar.gz", dir_out_bin, package_name, tag))
|
||||||
|
|
||||||
cli::cli_alert_info("{.fun build_single_tag}: 4. Removing {.path {local_clone_dir_single}}.")
|
cli::cli_alert_info("{.fun build_single_tag}: (4/4) Removing {.path {local_clone_dir_single}}.")
|
||||||
unlink(local_clone_dir_single, force = TRUE, recursive = TRUE)
|
unlink(local_clone_dir_single, force = TRUE, recursive = TRUE)
|
||||||
|
|
||||||
total_build_time <- round(Sys.time() - t1, 2)
|
total_build_time <- round(Sys.time() - t1, 2)
|
||||||
|
|
|
||||||
|
|
@ -40,13 +40,13 @@ upload_single_binary_to_s3 <- function(
|
||||||
sprintf("%s/%s", remote_bin_path, tarball_name)
|
sprintf("%s/%s", remote_bin_path, tarball_name)
|
||||||
)
|
)
|
||||||
} else if (exists && force) {
|
} else if (exists && force) {
|
||||||
cli::cli_alert_info("{.fun upload_single_binary_to_s3}: Force uploading package {.pkg {package_name}} {.path {tag}} because {.code force = TRUE} was set.")
|
cli::cli_alert_info("{.fun upload_single_binary_to_s3}: Force uploading package {.pkg {package_name}} {.field {tag}} because {.code force = TRUE} was set.")
|
||||||
s3fs::s3_file_upload(
|
s3fs::s3_file_upload(
|
||||||
sprintf("%s/%s", local_bin_path, tarball_name),
|
sprintf("%s/%s", local_bin_path, tarball_name),
|
||||||
sprintf("%s/%s", remote_bin_path, tarball_name),
|
sprintf("%s/%s", remote_bin_path, tarball_name),
|
||||||
overwrite = TRUE
|
overwrite = TRUE
|
||||||
)
|
)
|
||||||
} else if (exists && !force) {
|
} else if (exists && !force) {
|
||||||
cli::cli_alert_info("{.fun upload_single_binary_to_s3}: Package {.pkg {package_name}} {.path {tag}} already exists in S3. Skipping upload.")
|
cli::cli_alert_info("{.fun upload_single_binary_to_s3}: Package {.pkg {package_name}} {.field {tag}} already exists in S3. Skipping upload.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue