[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Mathieu Othacehe |
Date: |
Fri, 5 Mar 2021 03:09:49 -0500 (EST) |
branch: master
commit b6067195106826dd327e51af6c6768a3f8669afb
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Wed Mar 3 15:28:13 2021 +0100
Remove examples.
* Makefile.am (nobase_dist_pkgdata_DATA): Remove it.
* examples/gnu-system.scm: Remove it.
* examples/guix-jobs.scm: Remove it.
* examples/guix-track-git.scm: Remove it.
* examples/hello-git.scm: Remove it.
* examples/hello-singleton.scm: Remove it.
* examples/hello-subset.scm: Remove it.
* examples/random-jobs.scm: Remove it.
* examples/random.scm: Remove it.
---
Makefile.am | 9 --
examples/gnu-system.scm | 243 -------------------------------------------
examples/guix-jobs.scm | 47 ---------
examples/guix-track-git.scm | 225 ---------------------------------------
examples/hello-git.scm | 48 ---------
examples/hello-singleton.scm | 41 --------
examples/hello-subset.scm | 52 ---------
examples/random-jobs.scm | 69 ------------
examples/random.scm | 36 -------
9 files changed, 770 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 8d071cb..06f0f5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -248,15 +248,6 @@ MOSTLYCLEANFILES = $(bin_SCRIPTS) src/cuirass/config.scm
info_TEXINFOS = doc/cuirass.texi
doc_cuirass_TEXINFOS = doc/fdl-1.3.texi
-# Install the examples.
-nobase_dist_pkgdata_DATA = \
- examples/random.scm \
- examples/random-jobs.scm \
- examples/gnu-system.scm \
- examples/guix-jobs.scm \
- examples/hello-singleton.scm \
- examples/hello-subset.scm
-
## -------------- ##
## Installation. ##
## -------------- ##
diff --git a/examples/gnu-system.scm b/examples/gnu-system.scm
deleted file mode 100644
index ee2b571..0000000
--- a/examples/gnu-system.scm
+++ /dev/null
@@ -1,243 +0,0 @@
-;;;; gnu-system.scm - build jobs for Guix
-;;;
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; Cuirass is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; Cuirass is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
-
-;; Attempt to use Guix modules from git repository.
-(eval-when (compile load eval)
- ;; Ignore any available .go, and force recompilation. This is because our
- ;; checkout in the store has mtime set to the epoch, and thus .go files look
- ;; newer, even though they may not correspond.
- (set! %fresh-auto-compile #t))
-
-(use-modules (guix config)
- (guix store)
- (guix grafts)
- (guix packages)
- (guix derivations)
- (guix monads)
- ((guix licenses)
- #:select (gpl3+ license-name license-uri license-comment))
- ((guix utils) #:select (%current-system))
- ((guix scripts system) #:select (read-operating-system))
- (gnu packages)
- (gnu packages commencement)
- (gnu packages guile)
- (gnu packages make-bootstrap)
- (gnu system)
- (gnu system vm)
- (gnu system install)
- (srfi srfi-1)
- (ice-9 match))
-
-(define (license->alist lcs)
- "Return LCS <license> object as an alist."
- ;; Sometimes 'license' field is a list of licenses.
- (if (list? lcs)
- (map license->alist lcs)
- `((name . ,(license-name lcs))
- (uri . ,(license-uri lcs))
- (comment . ,(license-comment lcs)))))
-
-(define (package-metadata package)
- "Convert PACKAGE to an alist suitable for Hydra."
- `((#:description . ,(package-synopsis package))
- (#:long-description . ,(package-description package))
- (#:license . ,(license->alist (package-license package)))
- (#:home-page . ,(package-home-page package))
- (#:maintainers . ("bug-guix@gnu.org"))
- (#:max-silent-time . ,(or (assoc-ref (package-properties package)
- 'max-silent-time)
- 3600)) ;1 hour by default
- (#:timeout . ,(or (assoc-ref (package-properties package) 'timeout)
- 72000)))) ;20 hours by default
-
-(define (package-job store job-name package system)
- "Return a job called JOB-NAME that builds PACKAGE on SYSTEM."
- (lambda ()
- `((#:job-name . ,(string-append (symbol->string job-name) "." system))
- (#:derivation . ,(derivation-file-name
- (parameterize ((%graft? #f))
- (package-derivation store package system
- #:graft? #f))))
- ,@(package-metadata package))))
-
-(define (package-cross-job store job-name package target system)
- "Return a job called TARGET.JOB-NAME that cross-builds PACKAGE
-for TARGET on SYSTEM."
- (lambda ()
- `((#:job-name . ,(string-join (list target (symbol->string job-name)
system)
- "."))
- (#:derivation . ,(derivation-file-name
- (parameterize ((%graft? #f))
- (package-cross-derivation store package target system
- #:graft? #f))))
- ,@(package-metadata package))))
-
-(define %core-packages
- ;; Note: Don't put the '-final' package variants because (1) that's
- ;; implicit, and (2) they cannot be cross-built (due to the explicit input
- ;; chain.)
- (append (map specification->package
- '("gcc@4.8" "gcc@4.9" "gcc@5" "glibc" "binutils"
- "gmp" "mpfr" "mpc" "coreutils" "findutils" "diffutils"
"patch" "sed" "grep"
- "gawk" "gettext" "hello" "zlib" "gzip" "xz"))
- (list guile-2.0
- %bootstrap-binaries-tarball
- %binutils-bootstrap-tarball
- %glibc-bootstrap-tarball
- %gcc-bootstrap-tarball
- %guile-bootstrap-tarball
- %bootstrap-tarballs)))
-
-(define %packages-to-cross-build
- %core-packages)
-
-(define %cross-targets
- '("mips64el-linux-gnu"
- "mips64el-linux-gnuabi64"))
-
-(define (tarball-job store system)
- "Return Hydra jobs to build the self-contained Guix binary tarball."
- (lambda ()
- `((#:job-name . (string-append "binary-tarball." system))
- (#:derivation . ,(derivation-file-name
- (parameterize ((%graft? #f))
- (run-with-store store
- (mbegin %store-monad
- (set-guile-for-build (default-guile))
- (self-contained-tarball))
- #:system system))))
- (#:description . "Stand-alone binary Guix tarball")
- (#:long-description . "This is a tarball containing binaries of Guix
-and all its dependencies, and ready to be installed on non-GuixSD
-distributions.")
- (#:license . ,(license->alist gpl3+))
- (#:home-page . ,%guix-home-page-url)
- (#:maintainers . ("bug-guix@gnu.org")))))
-
-(define %job-name
- ;; Return the name of a package's job.
- (compose string->symbol package-full-name))
-
-(define package->job
- (let ((base-packages
- (delete-duplicates
- (append-map (match-lambda
- ((_ package _ ...)
- (match (package-transitive-inputs package)
- (((_ inputs _ ...) ...)
- inputs))))
- %final-inputs))))
- (lambda (store package system)
- "Return a job for PACKAGE on SYSTEM, or #f if this combination is not
-valid."
- (cond ((member package base-packages)
- #f)
- ((supported-package? package system)
- (package-job store (%job-name package) package system))
- (else
- #f)))))
-
-
-;;;
-;;; Hydra entry point.
-;;;
-
-(define (hydra-jobs store arguments)
- "Return Hydra jobs."
- (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)
- (define (from-32-to-64? target)
- ;; Return true if SYSTEM is 32-bit and TARGET is 64-bit. This hack
- ;; prevents known-to-fail cross-builds from i686-linux or armhf-linux to
- ;; mips64el-linux-gnuabi64.
- (and (or (string-prefix? "i686-" system)
- (string-prefix? "armhf-" system))
- (string-suffix? "64" target)))
-
- (define (same? target)
- ;; Return true if SYSTEM and TARGET are the same thing. This is so we
- ;; don't try to cross-compile to 'mips64el-linux-gnu' from
- ;; 'mips64el-linux'.
- (string-contains target system))
-
- (define (either proc1 proc2)
- (lambda (x)
- (or (proc1 x) (proc2 x))))
-
- (append-map (lambda (target)
- (map (lambda (package)
- (package-cross-job store (%job-name package)
- package target system))
- %packages-to-cross-build))
- (remove (either from-32-to-64? same?) %cross-targets)))
-
- ;; Turn off grafts. Grafting is meant to happen on the user's machines.
- (parameterize ((%graft? #f))
- ;; Return one job for each package, except bootstrap packages.
- (append-map (lambda (system)
- (case subset
- ((all)
- ;; Build everything, including replacements.
- (let ((pkgs (fold-packages
- (lambda (package result)
- (if (package-replacement package)
- (cons* package
- (package-replacement package)
- result)
- (cons package result)))
- '())))
- (append (filter-map (lambda (pkg)
- (package->job store pkg system))
- pkgs)
- (list (tarball-job store system))
- (cross-jobs system))))
- ((core)
- ;; Build core packages only.
- (append (map (lambda (package)
- (package-job store (%job-name package)
- 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)))
diff --git a/examples/guix-jobs.scm b/examples/guix-jobs.scm
deleted file mode 100644
index 2f1f1a2..0000000
--- a/examples/guix-jobs.scm
+++ /dev/null
@@ -1,47 +0,0 @@
-;;; guix-jobs.scm -- job specification test for Guix
-;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; Cuirass is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; Cuirass is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
-
-(define (job-base key value)
- `((#:name . ,(string-append "guix-" value))
- (#:load-path-inputs . ("guix"))
- (#:package-path-inputs . ())
- (#:proc-input . "cuirass")
- (#:proc-file . "examples/gnu-system.scm")
- (#:proc . hydra-jobs)
- (#:proc-args (subset . "hello"))
- (#:inputs . (,(acons key value
- '((#:name . "guix")
- (#:url . "git://git.savannah.gnu.org/guix.git")
- (#:load-path . ".")
- (#:no-compile? . #t)))
- ((#:name . "cuirass")
- (#:url .
"https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
- (#:load-path . ".")
- (#:branch . "master")
- (#:no-compile? . #t))))
- (#:build-outputs . ())))
-
-(define guix-master
- (job-base #:branch "master"))
-
-(define guix-0.15
- (job-base #:tag "v0.15.0"))
-
-(list guix-master guix-0.15)
diff --git a/examples/guix-track-git.scm b/examples/guix-track-git.scm
deleted file mode 100644
index ab8abaa..0000000
--- a/examples/guix-track-git.scm
+++ /dev/null
@@ -1,225 +0,0 @@
-;;; guix-track-git.scm -- job specification tracking a guix packages's git
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès
<ludo@gnu.org>
-;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; GNU Guix is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; GNU Guix is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-
-;;;
-;;; This file defines build jobs for the Hydra continuation integration
-;;; tool.
-;;;
-
-(define local-guix (string-append (getenv "HOME") "/src/guix"))
-(define local-cuirass (string-append (getenv "HOME") "/src/cuirass/src"))
-
-;; Attempt to use our very own Guix modules.
-(eval-when (compile load eval)
-
- (set! %load-path (cons* local-guix local-cuirass %load-path))
- (set! %load-path (cons (string-append local-cuirass "/gnu/packages/patches")
%load-path))
- (set! %load-compiled-path (cons local-guix %load-compiled-path))
- (set! %load-compiled-path (cons local-cuirass %load-compiled-path))
-
- ;; Ignore any available .go, and force recompilation. This is because our
- ;; checkout in the store has mtime set to the epoch, and thus .go files look
- ;; newer, even though they may not correspond.
- (set! %fresh-auto-compile #t))
-
-(use-modules (guix config)
- (guix store)
- (guix grafts)
- (guix packages)
- (guix derivations)
- (guix monads)
- ((guix licenses)
- #:select (gpl3+ license-name license-uri license-comment))
- ((guix utils) #:select (%current-system))
- ((guix scripts system) #:select (read-operating-system))
- (gnu packages)
- (gnu packages gcc)
- (gnu packages base)
- (gnu packages gawk)
- (gnu packages guile)
- (gnu packages gettext)
- (gnu packages compression)
- (gnu packages multiprecision)
- (gnu packages make-bootstrap)
- (gnu packages commencement)
- (gnu packages package-management)
- (gnu system)
- (gnu system vm)
- (gnu system install)
- (gnu tests)
- (srfi srfi-1)
- (srfi srfi-26)
- (ice-9 optargs)
- (ice-9 match))
-
-;; XXX: Debugging hack: since `hydra-eval-guile-jobs' redirects the output
-;; port to the bit bucket, let us write to the error port instead.
-(setvbuf (current-error-port) 'line)
-(set-current-output-port (current-error-port))
-
-(define (license->alist lcs)
- "Return LCS <license> object as an alist."
- ;; Sometimes 'license' field is a list of licenses.
- (if (list? lcs)
- (map license->alist lcs)
- `((name . ,(license-name lcs))
- (uri . ,(license-uri lcs))
- (comment . ,(license-comment lcs)))))
-
-(define (package-metadata package)
- "Convert PACKAGE to an alist suitable for Hydra."
- `((#:description . ,(package-synopsis package))
- (#:long-description . ,(package-description package))
- (#:license . ,(license->alist (package-license package)))
- (#:home-page . ,(package-home-page package))
- (#:maintainers . ("bug-guix@gnu.org"))
- (#:max-silent-time . ,(or (assoc-ref (package-properties package)
- 'max-silent-time)
- 3600)) ;1 hour by default
- (#:timeout . ,(or (assoc-ref (package-properties package) 'timeout)
- 72000)))) ;20 hours by default
-
-(define (package-job store job-name package system)
- "Return a job called JOB-NAME that builds PACKAGE on SYSTEM."
- (lambda ()
- `((#:job-name . ,(string-append (symbol->string job-name) "." system))
- (#:derivation . ,(derivation-file-name
- (parameterize ((%graft? #f))
- (package-derivation store package system
- #:graft? #f))))
- ,@(package-metadata package))))
-
-(define job-name
- ;; Return the name of a package's job.
- (compose string->symbol package-full-name))
-
-(define package->job
- (let ((base-packages
- (delete-duplicates
- (append-map (match-lambda
- ((_ package _ ...)
- (match (package-transitive-inputs package)
- (((_ inputs _ ...) ...)
- inputs))))
- %final-inputs))))
- (lambda (store package system)
- "Return a job for PACKAGE on SYSTEM, or #f if this combination is not
-valid."
- (cond ((member package base-packages)
- #f)
- ((supported-package? package system)
- (package-job store (job-name package) package system))
- (else
- #f)))))
-
-;;; END hydra/gnu-system.scm
-
-
-;;;
-;;; Cuirass CI tracking packages' git
-;;;
-
-(use-modules (srfi srfi-11)
- (srfi srfi-9 gnu)
- (rnrs io ports)
- (gnu packages)
- (guix base32)
- (guix git-download)
- (guix hash)
- (guix packages)
- (guix serialization)
- (guix utils)
- (guix ui)
- (cuirass base))
-
-(define (url->file-name url)
- (string-trim
- (string-map (lambda (c) (if (memq c (string->list ":/")) #\- c)) url)
- #\-))
-
-(define* (package->input pkg #:key (branch "master") commit url)
- (let ((url (or url ((compose git-reference-url origin-uri package-source)
pkg))))
- `((#:name . ,(url->file-name url))
- (#:url . ,url)
- (#:branch . ,branch)
- (#:commit . ,commit))))
-
-(define (vcs-file? file stat)
- (case (stat:type stat)
- ((directory)
- (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS")))
- (else
- #f)))
-
-(define select? (negate vcs-file?))
-
-(define (file-hash file)
- ;; Compute the hash of FILE.
- ;; Catch and gracefully report possible '&nar-error' conditions.
- (with-error-handling
- (let-values (((port get-hash) (open-sha256-port)))
- (write-file file port #:select? select?)
- (flush-output-port port)
- (get-hash))))
-
-(define (commit? string)
- (string-every (string->char-set "0123456789abcdef") string))
-
-(define (call-with-output-fdes fdes new-file thunk)
- (let ((outport (fdes->outport fdes))
- (port (open-file new-file "w")))
- (move->fdes port fdes)
- (let ((result (thunk)))
- (move->fdes port fdes)
- result)))
-
-(define* (package->git-tracked store pkg #:key (branch "master") commit url)
- (let* ((source (package-source pkg))
- (uri (origin-uri source)))
- (if (not branch)
- pkg
- (let* ((input (package->input pkg #:branch branch #:commit commit
#:url url))
- (checkout (fetch-input store input))
- (url (or url (git-reference-url uri)))
- ;; maybe (string-append (%package-cachedir) "/" (url->file-name
url))
- (git-dir (assq-ref checkout #:directory))
- (hash (bytevector->nix-base32-string (file-hash git-dir)))
- (source (origin (uri (git-reference
- (url url)
- (commit (assq-ref checkout #:commit))))
- (method git-fetch)
- (sha256 (base32 hash)))))
- (set-fields pkg ((package-source) source))))))
-
-
-;;;
-;;; Guix entry point.
-;;;
-
-(define (guix-jobs store arguments)
- (let* ((name (or (assoc-ref arguments 'name) "hello"))
- (pkg (specification->package name))
- (branch (or (assoc-ref arguments 'branch) "master"))
- (url (assoc-ref arguments 'url))
- (pkg.git (package->git-tracked store pkg #:branch branch #:url url))
- (system (or (assoc-ref arguments 'system) "x86_64-linux")))
- (parameterize ((%graft? #f))
- (list (package-job store (job-name pkg) pkg.git system)))))
diff --git a/examples/hello-git.scm b/examples/hello-git.scm
deleted file mode 100644
index c5e2ca2..0000000
--- a/examples/hello-git.scm
+++ /dev/null
@@ -1,48 +0,0 @@
-;;; hello-git.scm -- job specification test for hello git repository
-;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; Cuirass is free software: you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation, either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; Cuirass is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
-
-;; building GNU hello from git is too much work
-(define cuirass-git "https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
-;; ... so let's track cuirass' git
-
-;; This builds the Guix Cuirass package with its source replaced by the last
-;; commit of Cuirass' git repository.
-(let ((top-srcdir (canonicalize-path
- (string-append (dirname (current-filename)) "/.."))))
- (list
- `((#:name . "cuirass")
- (#:load-path-inputs . ("guix"))
- (#:package-path-inputs . ())
- (#:proc-input . "cuirass")
- (#:proc-file . "examples/guix-track-git.scm")
- (#:proc . guix-jobs)
- (#:proc-args (name . "cuirass") (url . ,cuirass-git))
- (#:inputs . (((#:name . "guix")
- (#:url . "git://git.savannah.gnu.org/guix.git")
- (#:load-path . ".")
- (#:branch . "master")
- (#:no-compile? . #t))
- ((#:name . "cuirass")
- (#:url . ,(string-append "file://" top-srcdir))
- (#:load-path . ".")
- (#:branch . "master")
- (#:no-compile? . #t))))
- (#:build-outputs . ()))))
diff --git a/examples/hello-singleton.scm b/examples/hello-singleton.scm
deleted file mode 100644
index 2d2d746..0000000
--- a/examples/hello-singleton.scm
+++ /dev/null
@@ -1,41 +0,0 @@
-;;; hello-singleton.scm -- job specification test for hello in master
-;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; Cuirass is free software: you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation, either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; Cuirass is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
-
-(define hello-master
- '((#:name . "guix-master")
- (#:load-path-inputs . ("guix"))
- (#:package-path-inputs . ())
- (#:proc-input . "cuirass")
- (#:proc-file . "examples/gnu-system.scm")
- (#:proc . hydra-jobs)
- (#:proc-args (subset . "hello"))
- (#:inputs . (((#:name . "guix")
- (#:url . "git://git.savannah.gnu.org/guix.git")
- (#:load-path . ".")
- (#:branch . "master")
- (#:no-compile? . #t))
- ((#:name . "cuirass")
- (#:url .
"https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
- (#:load-path . ".")
- (#:branch . "master")
- (#:no-compile? . #t))))
- (#:build-outputs . ())))
-
-(list hello-master)
diff --git a/examples/hello-subset.scm b/examples/hello-subset.scm
deleted file mode 100644
index e86668e..0000000
--- a/examples/hello-subset.scm
+++ /dev/null
@@ -1,52 +0,0 @@
-;;; hello-subset.scm -- job specification test for hello subset
-;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
-;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; Cuirass is free software; you can redistribute it and/or modify it
-;;; under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 3 of the License, or (at
-;;; your option) any later version.
-;;;
-;;; Cuirass is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
-
-(define (job-base key value)
- `((#:name . ,(string-append "guix-" value))
- (#:load-path-inputs . ("guix"))
- (#:package-path-inputs . ())
- (#:proc-input . "cuirass")
- (#:proc-file . "examples/gnu-system.scm")
- (#:proc . hydra-jobs)
- (#:proc-args (subset . "hello"))
- (#:inputs . (,(acons key value
- '((#:name . "guix")
- (#:url . "git://git.savannah.gnu.org/guix.git")
- (#:load-path . ".")
- (#:no-compile? . #t)))
- ((#:name . "cuirass")
- (#:url .
"https://git.savannah.gnu.org/git/guix/guix-cuirass.git")
- (#:load-path . ".")
- (#:branch . "master")
- (#:no-compile? . #t))))
- (#:build-outputs . ())))
-
-(define guix-master
- (job-base #:branch "master"))
-
-(define guix-core-updates
- (job-base #:branch "core-updates"))
-
-(define guix-0.15
- (job-base #:tag "v0.15.0"))
-
-(list guix-master
- guix-core-updates
- guix-0.15)
diff --git a/examples/random-jobs.scm b/examples/random-jobs.scm
deleted file mode 100644
index e820c0a..0000000
--- a/examples/random-jobs.scm
+++ /dev/null
@@ -1,69 +0,0 @@
-;;; random.scm -- Definition of the random build jobs
-;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; Cuirass is free software: you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation, either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; Cuirass is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
-
-
-(use-modules (guix)
- (srfi srfi-1)
- (srfi srfi-26))
-
-(define (make-job name derivation)
- (lambda ()
- `((#:job-name . ,name)
- (#:derivation . ,(derivation-file-name (force derivation)))
- (#:license . ((name . "GPLv3+")))
- (#:description "dummy job")
- (#:long-description "really dummy job"))))
-
-(define %seed
- (logxor (cdr (gettimeofday))
- (car (gettimeofday))
- (cdr (gettimeofday))))
-
-(define %state
- (seed->random-state %seed))
-
-(define* (random-derivation store #:optional (suffix ""))
- (let ((nonce (random 1e6)))
- (run-with-store store
- (gexp->derivation (string-append "random" suffix)
- #~(let ((state (seed->random-state #$%seed)))
- (sleep (pk 'sleeping (random 10 state)))
- (when (zero? (random 4 state))
- (error "we're faillliiiiing!"))
- #$nonce
- (mkdir #$output))))))
-
-
-(define (make-random-jobs store arguments)
- (let ((checkout (assq-ref arguments 'cuirass)))
- (format (current-error-port)
- "evaluating random jobs from directory ~s, commit ~s~%"
- (assq-ref checkout 'file-name)
- (assq-ref checkout 'revision)))
-
- (when (zero? (random 7 %state))
- (error "Evaluation is failing!"))
-
- (unfold (cut > <> 10)
- (lambda (i)
- (let ((suffix (number->string i)))
- (make-job (string-append "foo" suffix)
- (delay (random-derivation store suffix)))))
- 1+
- 0))
diff --git a/examples/random.scm b/examples/random.scm
deleted file mode 100644
index f15e158..0000000
--- a/examples/random.scm
+++ /dev/null
@@ -1,36 +0,0 @@
-;;; random.scm -- Job specification that creates random build jobs
-;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;;
-;;; This file is part of Cuirass.
-;;;
-;;; Cuirass is free software: you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation, either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; Cuirass is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
-
-(let ((top-srcdir (canonicalize-path
- (string-append (dirname (current-filename)) "/.."))))
- (list
- `((#:name . "random")
- (#:load-path-inputs . ()) ;use the Guix shipped with Cuirass
- (#:package-path-inputs . ())
- (#:proc-input . "cuirass")
- (#:proc-file . "examples/random-jobs.scm")
- (#:proc . make-random-jobs)
- (#:proc-args . ())
- (#:inputs . (((#:name . "cuirass")
- (#:url . ,(string-append "file://" top-srcdir))
- (#:load-path . ".")
- (#:branch . "master")
- (#:no-compile? . #t))))
- (#:build-outputs . ()))))