hydra: Build the installation image.

* build-aux/hydra/gnu-system.scm (demo-os): New procedure.
  (qemu-jobs): Build for both x86_64-linux and i686-linux.  Add
  'usb-image' job that builds INSTALLATION-OS.
This commit is contained in:
Ludovic Courtès 2014-05-31 22:15:06 +02:00
parent fc91c17aa8
commit 10d86d54f0
1 changed files with 21 additions and 11 deletions

View File

@ -55,6 +55,7 @@
(gnu packages make-bootstrap) (gnu packages make-bootstrap)
(gnu system) (gnu system)
(gnu system vm) (gnu system vm)
(gnu system install)
(srfi srfi-1) (srfi srfi-1)
(srfi srfi-26) (srfi srfi-26)
(ice-9 match)) (ice-9 match))
@ -114,6 +115,12 @@ SYSTEM."
'("mips64el-linux-gnu" '("mips64el-linux-gnu"
"mips64el-linux-gnuabi64")) "mips64el-linux-gnuabi64"))
(define (demo-os)
"Return the \"demo\" 'operating-system' structure."
(let* ((dir (dirname (assoc-ref (current-source-location) 'filename)))
(file (string-append dir "/demo-os.scm")))
(read-operating-system file)))
(define (qemu-jobs store system) (define (qemu-jobs store system)
"Return a list of jobs that build QEMU images for SYSTEM." "Return a list of jobs that build QEMU images for SYSTEM."
(define (->alist drv) (define (->alist drv)
@ -130,17 +137,20 @@ system.")
(string->symbol system)))) (string->symbol system))))
`(,name . ,(cut ->alist drv)))) `(,name . ,(cut ->alist drv))))
(if (string=? system "x86_64-linux") (define MiB
(let* ((dir (dirname (assoc-ref (current-source-location) 'filename))) (expt 2 20))
(file (string-append dir "/demo-os.scm"))
(os (read-operating-system file)) (if (member system '("x86_64-linux" "i686-linux"))
(size (* 1400 (expt 2 20)))) ; 1.4GiB (list (->job 'qemu-image
(if (operating-system? os) (run-with-store store
(list (->job 'qemu-image (system-qemu-image (demo-os)
(run-with-store store #:disk-image-size
(system-qemu-image os (* 1400 MiB)))) ; 1.4 GiB
#:disk-image-size size)))) (->job 'usb-image
'())) (run-with-store store
(system-disk-image installation-os
#:disk-image-size
(* 700 MiB)))))
'())) '()))
(define (hydra-jobs store arguments) (define (hydra-jobs store arguments)