Commit Graph

154 Commits (master)

Author SHA1 Message Date
Ludovic Courtès a42cf16fec
base: Provide 'build-derivations' with the full list of derivations.
This improves parallelism when 'max-jobs' is large.

* src/cuirass/base.scm (build-packages): Rewrite to pass the complete
list of derivations to 'build-derivations' at once.  Handle multiple outputs.
* src/schema.sql (Builds): Make "output" part of the primary key.

Co-authored-by: Mathieu Lirzin <mthl@gnu.org>
2017-02-24 19:33:41 +01:00
Ludovic Courtès 8c811abb31
base: Remove unnecessary 'file-exists?' call.
* src/cuirass/base.scm (fetch-repository): Remove 'file-exists?' call
before 'mkdir-p'.
2017-02-24 19:32:22 +01:00
Ludovic Courtès 61f8f75e93
base: Do not stop on the first build failure.
* src/cuirass/base.scm (process-specs): Systematically call
'set-build-options'.  Pass #:keep-going? #t.
2017-02-24 19:32:22 +01:00
Mathieu Lirzin 2418019798
evaluate: Use specification #:name in evaluation alists.
This fixes an issue in the database, where rows from the 'Evaluations' table
were having an "#f" value instead of a valid reference to their corresponding
specification.

* bin/evaluate.in (main): Use specification #:name instead of obsolete #:id.
2017-02-24 19:32:20 +01:00
Mathieu Othacehe aebad5184d
base: Handle multi-directories in load-path.
* src/cuirass/base.scm (set-guix-package-path!): Parse colon separated
directories in load-path.

Co-authored-by: Mathieu Lirzin <mthl@gnu.org>
2017-02-06 12:47:36 +01:00
Mathieu Lirzin f695c79eb3
doc: Describe how to send patches.
* doc/cuirass.texi (Contributing): Describe how to send patches.
2017-01-29 18:05:58 +01:00
Mathieu Lirzin 4d1f2d989d
maint: Add a pointer to the manual in the README.
* README <Contributing>: Point to the corresponding section in the manual.
2017-01-29 17:56:44 +01:00
Mathieu Othacehe abd52046d5
base: Handle 'git clone' errors correctly.
Fixes https://notabug.org/mthl/cuirass/issues/1.

* src/cuirass/base.scm (fetch-repository): Return #f when 'git clone' fails.
(process-specs): Test if commit is not #f before using its value.

Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
2017-01-29 17:28:38 +01:00
Mathieu Othacehe 5127c6797c
cuirass: Add "--load-path" option.
* bin/cuirass.in (%options): Add "--load-path" and "-L" command line options.
(show-help): Adapt.
* src/cuirass/base.scm (%guix-package-path): New parameter.
(set-guix-package-path!): New procedure.
(evaluate): Call "evaluate" script with '%guix-package-path'.
* bin/evaluate.in (main): Match 'guix-package-path' command line argument and
handle it.

Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
2017-01-29 17:19:20 +01:00
Mathieu Lirzin 4ca0c93875
build: Add '%aux-dir' variable.
* build-aux/guix.scm (%aux-dir): New variable.  Use it.
2017-01-24 20:11:55 +01:00
Mathieu Lirzin 19f8188d0e
build: Define 'spec+package-list' in "build-aux/guix.scm".
* build-aux/guix.scm (spec+package-list): New procedure.  Use it.
2017-01-23 02:41:53 +01:00
Mathieu Lirzin 3adf32e742
build: Don't generate ".version" since it has no use.
* Makefile.am (.version): Remove target.
(EXTRA_DIST): Adapt.
(BUILT_SOURCES): Likewise.
* build-aux/guix.scm (git-version-gen): Call 'git-version-gen' with
'.tarball-version'.
* .gitignore: Update.
2017-01-23 02:41:53 +01:00
Mathieu Lirzin 6abee31bee
doc: Update email contact for contributors.
* doc/cuirass.texi (Contributing): Use "bug-cuirass@framalistes.org" email
address.
2017-01-23 02:41:50 +01:00
Mathieu Lirzin d0a5801e39
database: db-add-derivation: Don't try to add a derivation twice.
This fixes the issue of having multiple identical derivations associated with
an evaluation as reported by Ludovic Courtès <ludo@gnu.org> at
<https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00109.html>.

* src/cuirass/database.scm (db-add-derivation): Ignore if JOB is already
present in DB.
2017-01-09 10:55:58 +01:00
Mathieu Lirzin 8988070725
maint: Fix mistake in copying permission statement.
This was mistakenly added in commit 05e5495e8f.

* Makefile.am: Declare GPLv3+ instead of GPLv2+.
* configure.ac: Likewise.
2017-01-09 00:41:13 +01:00
Mathieu Lirzin 49fae56c95
maint: Add new mailing list and webpage.
* configure.ac: Declare <bug-cuirass@framalistes.org> as package mailing list,
and <https://notabug.org/mthl/cuirass/> as package website.
* src/cuirass/ui.scm (show-package-information): Display them.
2017-01-09 00:35:19 +01:00
Mathieu Lirzin b29820b8bb
build: Reformat assignments.
* Makefile.am (guilesitedir, pkgmoduledir, BUILT_SOURCES): Add whitespaces
around '='.
2017-01-08 18:06:02 +01:00
Mathieu Lirzin 4ac708b0f6
build: Do not require "build-aux/guix.scm".
When building Cuirass with 'guix build -f build-aux/guix.scm' we don't want to
add "build-aux/guix.scm" in the repository snapshot since it is considered as
metadata.  As a consequence we can't make 'autoconf' require it.

* configure.ac (AC_REQUIRE_AUX_FILE): Remove "build-aux/guix.scm".
* Makefile.am (EXTRA_DIST): Only distribute it.
2016-12-29 12:00:18 +01:00
Mathieu Lirzin b32791d4bd
build: Fix typo "the" => "they".
* Makefile.am <Generated files>: Fix typo "the" => "they".
2016-12-28 19:12:29 +01:00
Mathieu Lirzin c26ffda7d6
build: Use portable substitution references.
* Makefile.am (nodist_guilesite_DATA, nodist_pkgmodule_DATA, CLEANFILES): Use
portable substitution references.
2016-12-28 19:12:29 +01:00
Mathieu Lirzin 206c302206
build: Add "build-aux/guix.scm".
* guix.scm: Delete.
* build-aux/guix-env: Likewise.
* build-aux/guix.scm: New file.
* configure.ac (AC_REQUIRE_AUX_FILE): Distribute it.
* README <Build Instructions>: Document it.
2016-12-28 19:11:43 +01:00
Mathieu Lirzin 145077f160
ci: Remove custom Guix package defintion.
* guix/ci.scm: Delete file.  Guix already provides a package definition for
Cuirass.
* build-aux/pre-inst-env.in (GUIX_PACKAGE_PATH): Remove.
2016-12-28 18:51:39 +01:00
Mathieu Lirzin 17dbfe679d
maint: Generate version number.
* build-aux/git-version-gen: New script.
* configure.ac (AC_INIT): Use it.
(AC_REQUIRE_AUX_FILE): Distribute it.
* Makefile.am (.version): New target.
(BUILT_SOURCES, EXTRA_DIST): Add it.
(dist-hook): Generate ".tarball-version".
* .gitignore: Update.
2016-12-28 18:51:39 +01:00
Mathieu Lirzin 8a782b3e84
cuirass: Add "--port" command line option.
* bin/cuirass.in (%options): Add "--port" and "-p" command line options.
(show-help): Adapt.
(main): Set default to 8080.  Call 'run-cuirass-server' with this.
* src/cuirass/http.scm (run-cuirass-server): Display the port number.
* doc/cuirass.texi (Invocation): Document new option.
2016-12-28 18:49:21 +01:00
Mathieu Lirzin b59b8e5567
http: Add 'port' keyword argument to 'run-cuirass-server'.
* src/cuirass/http.scm (run-cuirass-server): Add 'port' keyword argument.
2016-12-28 18:19:03 +01:00
Mathieu Lirzin 96be568de4
config: Remove references to '$prefix' expansion hack.
* src/cuirass/config.scm.in (%datadir, %localstatedir): Don't refer to
previous '$prefix' expansion hack in comments.
2016-12-28 18:19:03 +01:00
Mathieu Lirzin 57e10c6056
build: Set Guile load paths in 'pre-inst-env'.
This reverts most of 4f0d665746.  The load paths
are still hard coded after installation, however 'pre-inst-env' wrapper is
used for defining them in the local build environment.  This is more
convenient for running the tests manually or launching a Guile REPL with all
the Cuirass modules accessible.

* build-aux/pre-inst-env.in (GUILE_LOAD_PATH, GUILE_LOAD_COMPILED_PATH): New
variables.
* bin/cuirass.in: Comment Guile load paths.
* Makefile.am (local_load_path, local_load_compiled_path): Delete.
(AM_TESTS_ENVIRONMENT): Don't set Guile load paths.
(do_subst): Use install directories for Guile load paths.
(install-exec-hook): Uncomment 'cuirass' hard coded load paths.
2016-12-28 18:19:03 +01:00
Mathieu Lirzin 16aec469d4
repo: Add <repo> record datatype.
* src/cuirass/utils.scm (call-with-temporary-directory): New procedure.
* src/cuirass/repo.scm: Use it.  New file.
* tests/repo.scm: New tests.
* Makefile.am (dist_pkgmodule_DATA, TESTS): Add them.
2016-12-28 18:18:37 +01:00
Mathieu Lirzin a6807cb29c
doc: Add 'Overview' Chapter.
* doc/cuirass.texi (Overview): New chapter.
2016-12-16 14:07:31 +01:00
Mathieu Lirzin 97b707d32a
doc: Include 'Continuous Integration' in the introduction.
* doc/cuirass.texi (Continuous Integration): Make it a section of
the 'Introduction' chapter.
2016-12-16 13:49:16 +01:00
Mathieu Lirzin 041b56c480
build: Install the examples.
* Makefile.am (EXTRA_DIST): Move examples to ...
(nobase_dist_pkgdata_DATA): ... here.  New variable.
2016-12-16 13:39:51 +01:00
Mathieu Lirzin e9e1ce8e14
maint: Move examples from 'tests' to 'examples' directory.
* examples/gnu-system.scm: Moved from 'tests' directory.
* examples/guix-jobs.scm: Likewise.
* examples/guix-track-git.scm: Likewise.
* examples/hello-git.scm: Likewise.
* examples/hello-singleton.scm: Likewise.
* examples/hello-subset.scm: Likewise.
* Makefile.am (EXTRA_DIST): Adapt.
* README <Example>: Likewise.
2016-12-16 13:20:49 +01:00
Mathieu Lirzin 5dc1bf40e9
doc: Write Introduction.
* doc/cuirass.texi (Introduction): Write it.
2016-12-09 00:15:26 +01:00
Mathieu Lirzin e1b396b3c5
doc: Change short description.
* doc/cuirass.texi: Use "Build automation server" instead of "Continuous
Integration Tool".
2016-12-08 23:05:27 +01:00
Mathieu Lirzin cbdb59af8e
doc: Add Cuirass manual.
* doc/cuirass.texi: New file.
* doc/fdl-1.3.texi: Likewise.
* Makefile.am (info_TEXINFOS, doc_cuirass_TEXINFOS): New variables.
* dir-locals.el: Use the American dictionary for Texinfo mode.
* .gitignore: Update.
2016-12-04 22:31:03 +01:00
Mathieu Lirzin 05eba838ea
base: Create the parent directories of '%package-cachedir'.
* src/cuirass/base.scm (fetch-repository): Use 'mkdir-p' instead of 'mkdir'
for 'cachedirectory'.
2016-12-01 20:59:43 +01:00
Mathieu Lirzin 7248c0038f
build: Unquote local load paths.
* Makefile.am (local_load_path, local_load_compiled_path): Remove quotes that
were expanded in the generated files.
2016-11-29 18:49:43 +01:00
Mathieu Lirzin 81ff83354e
build: Remove duplicate sed expression.
* Makefile.am (do_subst): Remove duplicate line.
2016-11-17 01:19:05 +01:00
Mathieu Lirzin 5898e6f8f8
base: Use inner definitions instead of big anonymous procedures.
* src/cuirass/base.scm (build-packages, process-specs): Use an inner
definition instead of a big anonymous procedure.
2016-11-17 01:19:05 +01:00
Mathieu Lirzin bfd395c09f
db: Forbid inserting the same specification twice.
* src/schema.sql (Specifications): Make 'repo_name' the primary key.
(Stamps, Evaluations): Adapt.
* src/cuirass/database.scm (db-get-specifications): Likewise.
(db-add-specification): Ignore if SPEC has already been added.
* tests/database.scm (example-spec): Adapt.
2016-11-17 01:19:05 +01:00
Mathieu Lirzin a948f556eb
build: Use BUILT_SOURCES to avoid recompilation.
Before that, modifying 'src/cuirass/config.scm' was triggering the
recompilation of all modules which was unnecessary.

* Makefile.am (go_files, $(go_files)): Delete.
(BUILT_SOURCES): New variable.
2016-11-17 01:19:04 +01:00
Mathieu Lirzin 05e5495e8f
maint: Add copyright notices for the build system.
* configure.ac: Add copyright notice.
* Makefile.am: Likewise.
2016-11-12 17:58:17 +01:00
Mathieu Lirzin 4f0d665746
cuirass: Hard code Guile load paths.
* configure.ac (bin/cuirass, bin/evaluate): Let 'make' generate them.
* bin/cuirass.in: Hard code load paths to find Cuirass modules.
* Makefile.am (do_subst): Update substitution.
(bin/cuirass, bin/evaluate): New rules.
(EXTRA_DIST): Distribute 'bin/cuirass.in' and 'bin/evaluate.in'.
(MOSTLYCLEANFILES): Add '$(bin_SCRIPTS)'.
(install-exec-hook): New target.
(local_load_path, local_load_compiled_path): New variables.
(AM_TESTS_ENVIRONMENT): Set Guile load paths.
* build-aux/pre-inst-env.in: Don't modify Guile load paths.
2016-11-12 17:49:20 +01:00
Mathieu Lirzin 1e5012ca80
build: Let 'make' generate 'src/cuirass/config.scm'.
* Makefile.am (src/cuirass/config.scm, $(go_files)): New targets.
(do_subst, generate_file, go_files): New variables.
(EXTRA_DIST): Distribute 'src/cuirass/config.scm.in'.
(DISTCLEANFILES): Rename to ...
(MOSTLYCLEANFILES): ... this.
* configure.ac (AC_CONFIG_FILES): Remove 'src/cuirass/config.scm'.
(@expanded_datadir@, @expanded_localstatedir@): Delete.
(AC_PROG_MKDIR_P, AC_PROG_SED): Use them.
* src/cuirass/config.scm (%datadir): Set it to $(localstatedir).
(%localstatdir): Set it to $(datadir).
2016-11-12 17:07:57 +01:00
Mathieu Lirzin 12d71ee098
cuirass: Run HTTP server.
* src/cuirass.scm: Re-export (cuirass http) module.
* bin/cuirass.in (main): Run HTTP server and move the 'process-specs'
loop in another thread.
2016-11-03 00:20:27 +01:00
Mathieu Lirzin 5973db52c6
http: Add DB argument to 'url-handler'.
* src/cuirass/http.scm (not-found): Delete.
(url-handler): Add DB argument.
(run-cuirass-server): Likewise.  Pass it to 'run-server' STATE argument.
2016-11-03 00:20:27 +01:00
Mathieu Lirzin 3b72a158be
cuirass: Check specifications from the database inside the loop.
* bin/cuirass (main): Remove 'let' before main loop.
2016-11-03 00:20:06 +01:00
Roel Janssen 24d4505507
maint: Update README.
* README: Slightly change wording.

Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
2016-10-26 14:16:36 +02:00
Mathieu Lirzin 7f894427b2
maint: Use absolute directory names in GUIX_PACKAGE_PATH.
This fixes "tests/hello-singleton.scm" evaluation.

* build-aux/pre-inst-env.in (GUIX_PACKAGE_PATH): Use absolute directory
names.
2016-10-23 00:11:43 +02:00
Jan Nieuwenhuizen 686e31c590
base: Handle build failure.
* src/cuirass/base.scm (build-packages): Catch build failures, write
error log and update database.

Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
2016-09-23 16:53:40 +02:00