report installation time of deps for each package

This commit is contained in:
Patrick Schratz 2024-07-24 22:12:19 +02:00
commit db03c0dffb
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -5,6 +5,8 @@ install_package_system_dependencies <- function(package_name,
local_clone_dir) {
cli::cli_alert("{.fun install_package_system_dependencies}: Cloning package {.pkg {package_name[1]}} with tag {.field {tag}}.")
t1 <- Sys.time()
local_clone_dir_single <- sprintf("%s/%s_%s", local_clone_dir, package_name[1], tail(tag, 1))
if (!dir.exists(local_clone_dir_single)) {
@ -19,7 +21,10 @@ install_package_system_dependencies <- function(package_name,
Sys.setenv(PKG_SYSREQS_VERBOSE = TRUE)
suppressMessages(pak::local_install_dev_deps(sprintf("%s", local_clone_dir_single)))
cli::cli_alert("{.fun install_package_system_dependencies}: 4. Removing {.path {local_clone_dir_single}}.")
cli::cli_alert("{.fun install_package_system_dependencies}: Removing {.path {local_clone_dir_single}}.")
total_build_time <- round(Sys.time() - t1, 2)
cli::cli_alert("Execution time for installing dependencies of {.pkg {package_name[[1]]}}: {.strong {total_build_time} {units(difftime(Sys.time(), t1))}}.")
unlink(sprintf("%s", local_clone_dir_single), recursive = TRUE, force = TRUE)
}