summaryrefslogtreecommitdiff
path: root/build-aux/hydra
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/hydra')
-rw-r--r--build-aux/hydra/evaluate.scm13
-rw-r--r--build-aux/hydra/gnu-system.scm19
2 files changed, 28 insertions, 4 deletions
diff --git a/build-aux/hydra/evaluate.scm b/build-aux/hydra/evaluate.scm
index cc6a4b9492..604022abcf 100644
--- a/build-aux/hydra/evaluate.scm
+++ b/build-aux/hydra/evaluate.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -70,7 +71,7 @@ Otherwise return THING."
;; Without further ado...
(match (command-line)
- ((command file)
+ ((command file cuirass? ...)
;; Load FILE, a Scheme file that defines Hydra jobs.
(let ((port (current-output-port)))
(save-module-excursion
@@ -96,7 +97,11 @@ Otherwise return THING."
;; Call the entry point of FILE and print the resulting job sexp.
(pretty-print
- (match ((module-ref %user-module 'hydra-jobs) store '())
+ (match ((module-ref %user-module
+ (if (equal? cuirass? "cuirass")
+ 'cuirass-jobs
+ 'hydra-jobs))
+ store '())
(((names . thunks) ...)
(map (lambda (job thunk)
(format (current-error-port) "evaluating '~a'... " job)
@@ -107,8 +112,8 @@ Otherwise return THING."
names thunks)))
port))))
((command _ ...)
- (format (current-error-port) "Usage: ~a FILE
-Evaluate the Hydra jobs defined in FILE.~%"
+ (format (current-error-port) "Usage: ~a FILE [cuirass]
+Evaluate the Hydra or Cuirass jobs defined in FILE.~%"
command)
(exit 1)))
diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm
index 73bd566f7c..146d929f9b 100644
--- a/build-aux/hydra/gnu-system.scm
+++ b/build-aux/hydra/gnu-system.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -270,6 +271,8 @@ valid."
(define subset
(match (assoc-ref arguments 'subset)
("core" 'core) ; only build core packages
+ ("hello" 'hello) ; only build hello
+ (((? string?) (? string?) ...) 'list) ; only build selected list of packages
(_ 'all))) ; build everything
(define (cross-jobs system)
@@ -340,6 +343,22 @@ valid."
package system))
%core-packages)
(cross-jobs system)))
+ ((hello)
+ ;; Build hello package only.
+ (if (string=? system (%current-system))
+ (let ((hello (specification->package "hello")))
+ (list (package-job store (job-name hello) hello system)))
+ '()))
+ ((list)
+ ;; Build selected list of packages only.
+ (if (string=? system (%current-system))
+ (let* ((names (assoc-ref arguments 'subset))
+ (packages (map specification->package names)))
+ (map (lambda (package)
+ (package-job store (job-name package)
+ package system))
+ packages))
+ '()))
(else
(error "unknown subset" subset))))
%hydra-supported-systems)))