From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28487@debbugs.gnu.org
Subject: [bug#28487] [PATCH] cuirass: Add gnu-system build spec.
Date: Wed, 27 Sep 2017 22:52:01 +0200 [thread overview]
Message-ID: <871smrrhji.fsf@gnu.org> (raw)
In-Reply-To: <8760c3rifz.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 27 Sep 2017 22:32:32 +0200")
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
Jan Nieuwenhuizen writes:
> ...looked into this briefly but this would mean adding some option to
> evaluate.scm, something like
>
> ;; Without further ado...
> (match (command-line)
> - ((command file)
> + ((command file cuirass? ...))
> ...
> - (match ((module-ref %user-module 'hydra-jobs) store '())
> + (match ((module-ref %user-module
> + (if (equal? cuirass? "cuirass") cuirass-jobs 'hydra-jobs)
> ? store '())
Hmm, that could work---actual working prototype attached :-)
janneke
[-- Attachment #2: 0001-cuirass-Add-cuirass-jobs.scm-target-to-compute-the-C.patch --]
[-- Type: text/x-patch, Size: 3425 bytes --]
From 8c547d1d6a76dfb5e3b59f7fce404d0b60c6d929 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Wed, 27 Sep 2017 22:44:56 +0200
Subject: [PATCH] cuirass: Add 'cuirass-jobs.scm' target to compute the Cuirass
jobs.
* build-aux/hydra/evaluate.scm: Support "cuirass" command line option.
* Makefile.am (cuirass-jobs.scm): New target.
---
Makefile.am | 10 ++++++++++
build-aux/hydra/evaluate.scm | 13 +++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index a178d53cb..2c87e4fe3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,7 @@
# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
# Copyright © 2017 Leo Famulari <leo@famulari.name>
# Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+# Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -708,6 +709,15 @@ hydra-jobs.scm: $(GOBJECTS)
"$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp"
$(AM_V_at)mv "$@.tmp" "$@"
+# Compute the Cuirass jobs and write them in the target file.
+cuirass-jobs.scm: $(GOBJECTS)
+ $(AM_V_at)$(MKDIR_P) "`dirname "$@"`"
+ $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \
+ "$(top_srcdir)/build-aux/hydra/evaluate.scm" \
+ "$(top_srcdir)/build-aux/cuirass/gnu-system.scm" \
+ cuirass > "$@.tmp"
+ $(AM_V_at)mv "$@.tmp" "$@"
+
.PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version
.PHONY: assert-no-store-file-names assert-binaries-available
.PHONY: assert-final-inputs-self-contained
diff --git a/build-aux/hydra/evaluate.scm b/build-aux/hydra/evaluate.scm
index cc6a4b949..604022abc 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."
\f
;; 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)))
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next prev parent reply other threads:[~2017-09-27 20:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 20:11 [bug#28484] Some steps and questions for Cuirass Jan Nieuwenhuizen
2017-09-17 20:11 ` [bug#28485] [PATCH 1/3] base: Make working copy writable Jan Nieuwenhuizen
[not found] ` <handler.28485.B.1505679193775.ack@debbugs.gnu.org>
2017-09-18 15:46 ` bug#28485: Acknowledgement ([PATCH 1/3] base: Make working copy writable.) Jan Nieuwenhuizen
2017-09-17 20:11 ` [bug#28486] [PATCH 2/3] gnu-system: Accept subset with list of package names Jan Nieuwenhuizen
[not found] ` <handler.28486.B.1505679194784.ack@debbugs.gnu.org>
2017-09-18 15:45 ` bug#28486: Acknowledgement ([PATCH 2/3] gnu-system: Accept subset with list of package names.) Jan Nieuwenhuizen
2017-09-17 20:11 ` [bug#28488] [PATCH 3/3] base: Show feedback when build has finished Jan Nieuwenhuizen
[not found] ` <handler.28488.B.1505679198802.ack@debbugs.gnu.org>
2017-09-18 15:48 ` bug#28488: Acknowledgement ([PATCH 3/3] base: Show feedback when build has finished.) Jan Nieuwenhuizen
2017-09-17 20:11 ` [bug#28487] [PATCH] cuirass: Add gnu-system build spec Jan Nieuwenhuizen
2017-09-26 8:18 ` Ludovic Courtès
2017-09-26 17:56 ` Jan Nieuwenhuizen
2017-09-26 18:05 ` Jan Nieuwenhuizen
2017-09-26 20:29 ` Ludovic Courtès
2017-09-27 18:55 ` Jan Nieuwenhuizen
2017-09-27 19:45 ` Ludovic Courtès
2017-09-27 20:32 ` Jan Nieuwenhuizen
2017-09-27 20:52 ` Jan Nieuwenhuizen [this message]
2017-09-28 8:26 ` Ludovic Courtès
2017-09-28 15:41 ` bug#28487: " Jan Nieuwenhuizen
2017-09-28 8:27 ` [bug#28487] " Ludovic Courtès
2017-09-28 16:04 ` Jan Nieuwenhuizen
2017-09-18 11:51 ` [bug#28484] Some steps and questions for Cuirass Mathieu Othacehe
2017-09-18 15:44 ` bug#28484: " Jan Nieuwenhuizen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871smrrhji.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=28487@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).