mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
hydra: Invalidate derivation caches after each architecture evaluation.
This reduces max RSS from 1.3G to 1.0G. * guix/derivations.scm (invalidate-derivation-caches!): New procedure. * build-aux/hydra/gnu-system.scm (hydra-jobs): Use it. Add 'format' call.
This commit is contained in:
parent
d1f01e4845
commit
34797d8afc
2 changed files with 17 additions and 0 deletions
|
@ -334,6 +334,13 @@ (define (either proc1 proc2 proc3)
|
|||
(parameterize ((%graft? #f))
|
||||
;; Return one job for each package, except bootstrap packages.
|
||||
(append-map (lambda (system)
|
||||
(format (current-error-port)
|
||||
"evaluating for '~a' (heap size: ~a MiB)...~%"
|
||||
system
|
||||
(round
|
||||
(/ (assoc-ref (gc-stats) 'heap-size)
|
||||
(expt 2. 20))))
|
||||
(invalidate-derivation-caches!)
|
||||
(case subset
|
||||
((all)
|
||||
;; Build everything, including replacements.
|
||||
|
|
|
@ -90,6 +90,7 @@ (define-module (guix derivations)
|
|||
derivation-path->output-paths
|
||||
derivation
|
||||
raw-derivation
|
||||
invalidate-derivation-caches!
|
||||
|
||||
map-derivation
|
||||
|
||||
|
@ -841,6 +842,15 @@ (define input->derivation-input
|
|||
(hash-set! %derivation-cache file drv*)
|
||||
drv*)))
|
||||
|
||||
(define (invalidate-derivation-caches!)
|
||||
"Invalidate internal derivation caches. This is mostly useful for
|
||||
long-running processes that know what they're doing. Use with care!"
|
||||
;; Typically this is meant to be used by Cuirass and Hydra, which can clear
|
||||
;; caches when they start evaluating packages for another architecture.
|
||||
(invalidate-memoization! derivation->bytevector)
|
||||
(invalidate-memoization! derivation-path->base16-hash)
|
||||
(hash-clear! %derivation-cache))
|
||||
|
||||
(define* (map-derivation store drv mapping
|
||||
#:key (system (%current-system)))
|
||||
"Given MAPPING, a list of pairs of derivations, return a derivation based on
|
||||
|
|
Loading…
Reference in a new issue