guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/08: cuirass: Factorize hydra-to-cuirass CI job translation.


From: Ludovic Courtès
Subject: 06/08: cuirass: Factorize hydra-to-cuirass CI job translation.
Date: Wed, 4 Apr 2018 16:54:59 -0400 (EDT)

civodul pushed a commit to branch wip-pull-multiple-derivations
in repository guix.

commit b2abd6408bd6da2ac57eb14af70e8d78403af252
Author: Ludovic Courtès <address@hidden>
Date:   Mon Mar 26 23:11:16 2018 +0200

    cuirass: Factorize hydra-to-cuirass CI job translation.
    
    * build-aux/cuirass/gnu-system.scm: Move code to...
    * build-aux/cuirass/hydra-to-cuirass.scm: ... here, and include it.
    * Makefile.am (EXTRA_DIST): Add 'build-aux/cuirass/hydra-to-cuirass.scm'
    and 'build-aux/cuirass/gnu-system.scm'.
---
 Makefile.am                                        |  2 ++
 build-aux/cuirass/gnu-system.scm                   | 26 +---------------------
 .../{gnu-system.scm => hydra-to-cuirass.scm}       |  6 ++---
 3 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 908115e..e630797 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -468,6 +468,8 @@ EXTRA_DIST =                                                
\
   build-aux/hydra/gnu-system.scm                       \
   build-aux/hydra/guix.scm                             \
   build-aux/hydra/guix-modular.scm                     \
+  build-aux/cuirass/gnu-system.scm                     \
+  build-aux/cuirass/hydra-to-cuirass.scm               \
   build-aux/check-available-binaries.scm               \
   build-aux/check-final-inputs-self-contained.scm      \
   build-aux/compile-as-derivation.scm                  \
diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-system.scm
index f545ba0..9390785 100644
--- a/build-aux/cuirass/gnu-system.scm
+++ b/build-aux/cuirass/gnu-system.scm
@@ -22,28 +22,4 @@
 ;;;
 
 (include-from-path "build-aux/hydra/gnu-system.scm")
-
-(use-modules ((guix licenses)
-              #:select (license? license-name license-uri license-comment)))
-
-(define (cuirass-jobs store arguments)
-  "Return Cuirass jobs."
-  (map hydra-job->cuirass-job (hydra-jobs store arguments)))
-
-(define (hydra-job->cuirass-job hydra-job)
-  (let ((name (car hydra-job))
-        (job ((cdr hydra-job))))
-    (lambda _ (acons #:job-name (symbol->string name)
-                     (map symbol-alist-entry->keyword-alist-entry job)))))
-
-(define (symbol-alist-entry->keyword-alist-entry entry)
-  (cons (symbol->keyword (car entry)) (entry->sexp-entry (cdr entry))))
-
-(define (entry->sexp-entry o)
-  (match o
-    ((? license?) `((name . (license-name o))
-                    (uri . ,(license-uri o))
-                    (comment . ,(license-comment o))))
-    ((lst ...)
-     (map entry->sexp-entry lst))
-    (_ o)))
+(include-from-path "build-aux/cuirass/hydra-to-cuirass.scm")
diff --git a/build-aux/cuirass/gnu-system.scm 
b/build-aux/cuirass/hydra-to-cuirass.scm
similarity index 92%
copy from build-aux/cuirass/gnu-system.scm
copy to build-aux/cuirass/hydra-to-cuirass.scm
index f545ba0..75c77ea 100644
--- a/build-aux/cuirass/gnu-system.scm
+++ b/build-aux/cuirass/hydra-to-cuirass.scm
@@ -17,12 +17,10 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;;
-;;; This file defines build jobs for the Cuirass continuation integration
-;;; tool.
+;;; This file defines the conversion of Hydra build jobs to Cuirass build
+;;; jobs.  It is meant to be included in other files.
 ;;;
 
-(include-from-path "build-aux/hydra/gnu-system.scm")
-
 (use-modules ((guix licenses)
               #:select (license? license-name license-uri license-comment)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]