perf: use ccache and parallel make, and skip already-built newer-R candidates in bulk (#240)
Some checks failed
ci/crow/cron/process-updates/2 Pipeline was successful
ci/crow/cron/process-updates/11 Pipeline was successful
ci/crow/cron/process-updates/9 Pipeline was successful
ci/crow/cron/process-updates/16 Pipeline was successful
ci/crow/cron/process-updates/8 Pipeline was successful
ci/crow/cron/process-updates/15 Pipeline was successful
ci/crow/cron/process-updates/13 Pipeline was successful
ci/crow/cron/process-updates/10 Pipeline was successful
ci/crow/cron/process-updates/12 Pipeline was successful
ci/crow/cron/process-updates/4 Pipeline was successful
ci/crow/cron/process-updates/14 Pipeline was successful
ci/crow/cron/process-updates/3 Pipeline was successful
ci/crow/cron/process-updates/6 Pipeline is running
ci/crow/cron/process-updates/5 Pipeline failed
ci/crow/cron/process-updates/7 Pipeline was successful
ci/crow/cron/process-updates/1 Pipeline was successful
Some checks failed
ci/crow/cron/process-updates/2 Pipeline was successful
ci/crow/cron/process-updates/11 Pipeline was successful
ci/crow/cron/process-updates/9 Pipeline was successful
ci/crow/cron/process-updates/16 Pipeline was successful
ci/crow/cron/process-updates/8 Pipeline was successful
ci/crow/cron/process-updates/15 Pipeline was successful
ci/crow/cron/process-updates/13 Pipeline was successful
ci/crow/cron/process-updates/10 Pipeline was successful
ci/crow/cron/process-updates/12 Pipeline was successful
ci/crow/cron/process-updates/4 Pipeline was successful
ci/crow/cron/process-updates/14 Pipeline was successful
ci/crow/cron/process-updates/3 Pipeline was successful
ci/crow/cron/process-updates/6 Pipeline is running
ci/crow/cron/process-updates/5 Pipeline failed
ci/crow/cron/process-updates/7 Pipeline was successful
ci/crow/cron/process-updates/1 Pipeline was successful
This commit is contained in:
parent
e7821a75d5
commit
773add042c
1 changed files with 234 additions and 0 deletions
|
|
@ -73,3 +73,42 @@ newer_r_candidates <- function(db, primary_r, target_r) {
|
|||
result <- db[selected, c("Package", "Version"), drop = FALSE]
|
||||
result[order(result$Package), , drop = FALSE]
|
||||
}
|
||||
|
||||
# Candidates that still need a build, decided from one bucket listing per slot
|
||||
# instead of a metadata-DB connection and several S3 requests per package.
|
||||
#
|
||||
# Mirrors bincraft's own skip decision: a package is done when a binary sits at
|
||||
# the path its cached ABI verdict routes it to, `<slot>/<minor>/` when
|
||||
# r-minor-sensitive and the flat `<slot>/` otherwise. A CRAN source sitting at
|
||||
# that key is a fallback, not a binary (see outstanding_packages()). Whatever
|
||||
# this cannot decide, no cached verdict or a slot that could not be listed,
|
||||
# stays in the list, so bincraft makes that call exactly as before.
|
||||
#
|
||||
# `sensitive` cached verdicts for the current classifier, named `<pkg>_<ver>`
|
||||
# `flat_etags` listing of the flat slot as for outstanding_packages(), or
|
||||
# NULL when it could not be listed
|
||||
# `minor_etags` the same for this interpreter's per-minor slot
|
||||
newer_r_outstanding <- function(
|
||||
pkgs,
|
||||
sensitive,
|
||||
flat_etags,
|
||||
minor_etags,
|
||||
cran_md5
|
||||
) {
|
||||
verdict <- unname(sensitive[paste(pkgs$Package, pkgs$Version, sep = "_")])
|
||||
version <- stats::setNames(pkgs$Version, pkgs$Package)
|
||||
keep <- rep(TRUE, nrow(pkgs))
|
||||
routes <- list(
|
||||
list(sensitive = FALSE, etags = flat_etags),
|
||||
list(sensitive = TRUE, etags = minor_etags)
|
||||
)
|
||||
for (route in routes) {
|
||||
idx <- which(verdict %in% route$sensitive)
|
||||
if (length(idx) == 0L || is.null(route$etags)) {
|
||||
next
|
||||
}
|
||||
keep[idx] <- pkgs$Package[idx] %in%
|
||||
outstanding_packages(pkgs$Package[idx], route$etags, version, cran_md5)
|
||||
}
|
||||
pkgs[keep, , drop = FALSE]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue