From eda3fcfb46586710fff876ce6254b300795ef543 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 13 Jun 2020 15:58:06 +0200 Subject: ci: Build Guix System images. --- gnu/ci.scm | 74 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 35 deletions(-) (limited to 'gnu/ci.scm') diff --git a/gnu/ci.scm b/gnu/ci.scm index fa67168e224..3ff43522d45 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -53,6 +53,7 @@ #:use-module (gnu system image) #:use-module (gnu system vm) #:use-module (gnu system install) + #:use-module (gnu system images hurd) #:use-module (gnu tests) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -185,18 +186,21 @@ SYSTEM." (remove (either from-32-to-64? same? pointless?) %cross-targets))) -(define %guixsd-supported-systems - '("x86_64-linux" "i686-linux" "armhf-linux")) +;; Architectures that are able to build or cross-build Guix System images. +;; This does not mean that other architectures are not supported, only that +;; they are often not fast enough to support Guix System images building. +(define %guix-system-supported-systems + '("x86_64-linux" "i686-linux")) -(define %u-boot-systems - '("armhf-linux")) +(define %guix-system-images + (list hurd-barebones-disk-image)) -(define (qemu-jobs store system) - "Return a list of jobs that build QEMU images for SYSTEM." +(define (image-jobs store system) + "Return a list of jobs that build images for SYSTEM." (define (->alist drv) `((derivation . ,(derivation-file-name drv)) - (description . "Stand-alone QEMU image of the GNU system") - (long-description . "This is a demo stand-alone QEMU image of the GNU + (description . "Stand-alone image of the GNU system") + (long-description . "This is a demo stand-alone image of the GNU system.") (license . ,(license-name gpl3+)) (max-silent-time . 600) @@ -211,30 +215,34 @@ system.") (parameterize ((%graft? #f)) (->alist drv)))))) + (define (build-image image) + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (lower-object (system-image image))))) + (define MiB (expt 2 20)) - (if (member system %guixsd-supported-systems) - (list (->job 'usb-image - (run-with-store store - (mbegin %store-monad - (set-guile-for-build (default-guile)) - (lower-object - (system-image - (image - (inherit efi-disk-image) - (size (* 1500 MiB)) - (operating-system installation-os))))))) - (->job 'iso9660-image - (run-with-store store - (mbegin %store-monad - (set-guile-for-build (default-guile)) - (lower-object - (system-image - (image - (inherit iso9660-image) - (operating-system installation-os)))))))) - '())) + (if (member system %guix-system-supported-systems) + `(,(->job 'usb-image + (build-image + (image + (inherit efi-disk-image) + (size (* 1500 MiB)) + (operating-system installation-os)))) + ,(->job 'iso9660-image + (build-image + (image + (inherit iso9660-image) + (operating-system installation-os)))) + ;; Only cross-compile Guix System images from x86_64-linux for now. + ,@(if (string=? system "x86_64-linux") + (map (lambda (image) + (->job (image-name image) (build-image image))) + %guix-system-images) + '()) + '()))) (define channel-build-system ;; Build system used to "convert" a channel instance to a package. @@ -305,11 +313,7 @@ system.") "." system)))) (cons name (test->thunk test)))) - (if (and (member system %guixsd-supported-systems) - - ;; XXX: Our build farm has too few ARMv7 machines and they are very - ;; slow, so skip system tests there. - (not (string=? system "armhf-linux"))) + (if (member system %guix-system-supported-systems) ;; Override the value of 'current-guix' used by system tests. Using a ;; channel instance makes tests that rely on 'current-guix' less ;; expensive. It also makes sure we get a valid Guix package when this @@ -486,7 +490,7 @@ Return #f if no such checkout is found." (package->job store package system)))) (append (filter-map job all) - (qemu-jobs store system) + (image-jobs store system) (system-test-jobs store system #:source source #:commit commit) -- cgit v1.3 From 1189f405ae9b02389c4fd9adf92e8f31c706b748 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 25 Jun 2020 01:27:55 +0200 Subject: Revert "ci: Build Guix System images." This reverts commit eda3fcfb46586710fff876ce6254b300795ef543. This change broke evaluations on CI: @ build-succeeded /gnu/store/991738x97ff1f8181a7p1pflqwkgagm8-profile.drv - ERROR: In procedure read: In procedure scm_lreadr: #:16:144: Unknown # object: #\< --- gnu/ci.scm | 74 +++++++++++++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 39 deletions(-) (limited to 'gnu/ci.scm') diff --git a/gnu/ci.scm b/gnu/ci.scm index 3ff43522d45..fa67168e224 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -53,7 +53,6 @@ #:use-module (gnu system image) #:use-module (gnu system vm) #:use-module (gnu system install) - #:use-module (gnu system images hurd) #:use-module (gnu tests) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -186,21 +185,18 @@ SYSTEM." (remove (either from-32-to-64? same? pointless?) %cross-targets))) -;; Architectures that are able to build or cross-build Guix System images. -;; This does not mean that other architectures are not supported, only that -;; they are often not fast enough to support Guix System images building. -(define %guix-system-supported-systems - '("x86_64-linux" "i686-linux")) +(define %guixsd-supported-systems + '("x86_64-linux" "i686-linux" "armhf-linux")) -(define %guix-system-images - (list hurd-barebones-disk-image)) +(define %u-boot-systems + '("armhf-linux")) -(define (image-jobs store system) - "Return a list of jobs that build images for SYSTEM." +(define (qemu-jobs store system) + "Return a list of jobs that build QEMU images for SYSTEM." (define (->alist drv) `((derivation . ,(derivation-file-name drv)) - (description . "Stand-alone image of the GNU system") - (long-description . "This is a demo stand-alone image of the GNU + (description . "Stand-alone QEMU image of the GNU system") + (long-description . "This is a demo stand-alone QEMU image of the GNU system.") (license . ,(license-name gpl3+)) (max-silent-time . 600) @@ -215,34 +211,30 @@ system.") (parameterize ((%graft? #f)) (->alist drv)))))) - (define (build-image image) - (run-with-store store - (mbegin %store-monad - (set-guile-for-build (default-guile)) - (lower-object (system-image image))))) - (define MiB (expt 2 20)) - (if (member system %guix-system-supported-systems) - `(,(->job 'usb-image - (build-image - (image - (inherit efi-disk-image) - (size (* 1500 MiB)) - (operating-system installation-os)))) - ,(->job 'iso9660-image - (build-image - (image - (inherit iso9660-image) - (operating-system installation-os)))) - ;; Only cross-compile Guix System images from x86_64-linux for now. - ,@(if (string=? system "x86_64-linux") - (map (lambda (image) - (->job (image-name image) (build-image image))) - %guix-system-images) - '()) - '()))) + (if (member system %guixsd-supported-systems) + (list (->job 'usb-image + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (lower-object + (system-image + (image + (inherit efi-disk-image) + (size (* 1500 MiB)) + (operating-system installation-os))))))) + (->job 'iso9660-image + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (lower-object + (system-image + (image + (inherit iso9660-image) + (operating-system installation-os)))))))) + '())) (define channel-build-system ;; Build system used to "convert" a channel instance to a package. @@ -313,7 +305,11 @@ system.") "." system)))) (cons name (test->thunk test)))) - (if (member system %guix-system-supported-systems) + (if (and (member system %guixsd-supported-systems) + + ;; XXX: Our build farm has too few ARMv7 machines and they are very + ;; slow, so skip system tests there. + (not (string=? system "armhf-linux"))) ;; Override the value of 'current-guix' used by system tests. Using a ;; channel instance makes tests that rely on 'current-guix' less ;; expensive. It also makes sure we get a valid Guix package when this @@ -490,7 +486,7 @@ Return #f if no such checkout is found." (package->job store package system)))) (append (filter-map job all) - (image-jobs store system) + (qemu-jobs store system) (system-test-jobs store system #:source source #:commit commit) -- cgit v1.3 From b06ba9e0ff79d3130a81ee48a11a27af6330dcf0 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 13 Jun 2020 15:58:06 +0200 Subject: ci: Build Guix System images. Build a list of Guix System images. For now, this list only contains the Hurd barebones Guix System image. * gnu/ci.scm (%guixsd-supported-systems): Remove "armhf-linux", (%u-boot-systems): remove unused variable, (%guix-system-images): new variable (qemu-jobs): rename to "image-jobs" and build the Guix Systems listed in the new "%guix-system-images" variable, (system-test-jobs): adapt accordingly, (hydra-jobs): ditto. --- gnu/ci.scm | 72 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 34 deletions(-) (limited to 'gnu/ci.scm') diff --git a/gnu/ci.scm b/gnu/ci.scm index fa67168e224..834e0f12601 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -53,6 +53,7 @@ #:use-module (gnu system image) #:use-module (gnu system vm) #:use-module (gnu system install) + #:use-module (gnu system images hurd) #:use-module (gnu tests) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -185,18 +186,21 @@ SYSTEM." (remove (either from-32-to-64? same? pointless?) %cross-targets))) -(define %guixsd-supported-systems - '("x86_64-linux" "i686-linux" "armhf-linux")) +;; Architectures that are able to build or cross-build Guix System images. +;; This does not mean that other architectures are not supported, only that +;; they are often not fast enough to support Guix System images building. +(define %guix-system-supported-systems + '("x86_64-linux" "i686-linux")) -(define %u-boot-systems - '("armhf-linux")) +(define %guix-system-images + (list hurd-barebones-disk-image)) -(define (qemu-jobs store system) - "Return a list of jobs that build QEMU images for SYSTEM." +(define (image-jobs store system) + "Return a list of jobs that build images for SYSTEM." (define (->alist drv) `((derivation . ,(derivation-file-name drv)) - (description . "Stand-alone QEMU image of the GNU system") - (long-description . "This is a demo stand-alone QEMU image of the GNU + (description . "Stand-alone image of the GNU system") + (long-description . "This is a demo stand-alone image of the GNU system.") (license . ,(license-name gpl3+)) (max-silent-time . 600) @@ -211,29 +215,33 @@ system.") (parameterize ((%graft? #f)) (->alist drv)))))) + (define (build-image image) + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (lower-object (system-image image))))) + (define MiB (expt 2 20)) - (if (member system %guixsd-supported-systems) - (list (->job 'usb-image - (run-with-store store - (mbegin %store-monad - (set-guile-for-build (default-guile)) - (lower-object - (system-image - (image - (inherit efi-disk-image) - (size (* 1500 MiB)) - (operating-system installation-os))))))) - (->job 'iso9660-image - (run-with-store store - (mbegin %store-monad - (set-guile-for-build (default-guile)) - (lower-object - (system-image - (image - (inherit iso9660-image) - (operating-system installation-os)))))))) + (if (member system %guix-system-supported-systems) + `(,(->job 'usb-image + (build-image + (image + (inherit efi-disk-image) + (size (* 1500 MiB)) + (operating-system installation-os)))) + ,(->job 'iso9660-image + (build-image + (image + (inherit iso9660-image) + (operating-system installation-os)))) + ;; Only cross-compile Guix System images from x86_64-linux for now. + ,@(if (string=? system "x86_64-linux") + (map (lambda (image) + (->job (image-name image) (build-image image))) + %guix-system-images) + '())) '())) (define channel-build-system @@ -305,11 +313,7 @@ system.") "." system)))) (cons name (test->thunk test)))) - (if (and (member system %guixsd-supported-systems) - - ;; XXX: Our build farm has too few ARMv7 machines and they are very - ;; slow, so skip system tests there. - (not (string=? system "armhf-linux"))) + (if (member system %guix-system-supported-systems) ;; Override the value of 'current-guix' used by system tests. Using a ;; channel instance makes tests that rely on 'current-guix' less ;; expensive. It also makes sure we get a valid Guix package when this @@ -486,7 +490,7 @@ Return #f if no such checkout is found." (package->job store package system)))) (append (filter-map job all) - (qemu-jobs store system) + (image-jobs store system) (system-test-jobs store system #:source source #:commit commit) -- cgit v1.3 From 880bf7a0946991dc68eaa4a344e24d60072e2672 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 29 Jun 2020 17:22:11 +0200 Subject: ci: Do not limit disk-image size. Installation tests are already checking the disk-image size. Do not set another limit here. * gnu/ci.scm (image-jobs): Do not limit disk-image size. --- gnu/ci.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/ci.scm') diff --git a/gnu/ci.scm b/gnu/ci.scm index 834e0f12601..af0bb66775b 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -229,7 +229,6 @@ system.") (build-image (image (inherit efi-disk-image) - (size (* 1500 MiB)) (operating-system installation-os)))) ,(->job 'iso9660-image (build-image -- cgit v1.3