Cuirass continuous integration tool https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git
Go to file
Mathieu Othacehe 0497e0d6c4
Update TODO.
2021-03-23 09:54:08 +01:00
bin Use a single Cuirass binary. 2021-03-22 18:29:06 +01:00
build-aux
doc Update documentation. 2021-03-22 18:29:06 +01:00
examples
src Add builds per machine metric table. 2021-03-23 09:54:07 +01:00
tests Add builds count per machine metric. 2021-03-22 19:40:31 +01:00
.dir-locals.el
.gitignore Add remote building tests. 2021-03-22 18:29:07 +01:00
COPYING
Makefile.am Update copyrights. 2021-03-22 18:31:41 +01:00
NEWS Add a NEWS file. 2021-03-22 18:29:06 +01:00
README Update documentation. 2021-03-22 18:29:06 +01:00
TODO Update TODO. 2021-03-23 09:54:08 +01:00
bootstrap
configure.ac Update copyrights. 2021-03-22 18:31:41 +01:00

README

-*- mode: org -*-

Cuirass is a continuous integration tool using GNU Guix.

* Requirements

Cuirass currently depends on the following packages:

  - GNU Guile 3.0.x or 2.2.x
  - GNU Guix (and all its development dependencies)
  - GNU Make
  - Guile-JSON 3.x
  - Guile-Avahi
  - Guile-Squee
  - Guile-Git
  - Guile-zlib
  - Guile-Mastodon
  - Guile-Simple-ZMQ
  - Ephemeral PostgreSQL (for the tests)
  - Mailutils
  - Fibers

A convenient way to install those dependencies is to install Guix and execute
the following command:

#+BEGIN_EXAMPLE
  guix environment cuirass
#+END_EXAMPLE

This will build and enter an environment which provides all the necessary
dependencies.

* Build Instructions

When all the dependencies are available on you system, in order to build
Cuirass, you can proceed with the usual:

#+BEGIN_EXAMPLE
  ./bootstrap && ./configure && make
#+END_EXAMPLE

* Database connection

Cuirass uses PostgreSQL to store information about jobs, past build results
and to coordinate the execution of jobs.  The database connection string must
be passed to Cuirass using the =database= argument, under the keyword/value
format described [[https://www.postgresql.org/docs/10/libpq-connect.html#LIBPQ-CONNSTRING][here]].  The PostgreSQL database must be created beforehand.

By default, this command:

#+BEGIN_EXAMPLE
  ./pre-inst-env cuirass register
#+END_EXAMPLE

will connect using the Unix socket at =/var/run/postgresql= to the =cuirass=
database and is equivalent to:

#+BEGIN_EXAMPLE
  ./pre-inst-env cuirass register --database="dbname=cuirass host=/var/run/postgresql"
#+END_EXAMPLE

To use a TCP connection, one can use:

#+BEGIN_EXAMPLE
  ./pre-inst-env cuirass register --database="host=127.0.0.1"
#+END_EXAMPLE

* Run tests

Cuirass tests also require an access to a PostgreSQL database, provided by the
Ephemeral PostgreSQL package.  The =pg_tmp= script needs to be part of the
path before running the usual:

#+BEGIN_EXAMPLE
  make check
#+END_EXAMPLE

* Example

A quick way to manually test Cuirass is to execute:

#+BEGIN_EXAMPLE
  ./pre-inst-env cuirass register --specifications=examples/hello.scm
#+END_EXAMPLE

This will read the file "examples/hello.scm" which contains a list of
specifications and add them to the =cuirass= database.  It will then build the
=hello= package on top of the default Guix channel.

Cuirass then loops evaluating/building the specs.  The database keeps track
of the specifications in order to allow users to accumulate specifications.
To resume the evaluation/build process you can execute the same command
without the '--specifications' option:

#+BEGIN_EXAMPLE
  ./pre-inst-env cuirass register
#+END_EXAMPLE

To start the web interface run:

#+BEGIN_EXAMPLE
  ./pre-inst-env cuirass web
#+END_EXAMPLE

* Contributing

See the manual for useful hacking informations, by running

#+BEGIN_EXAMPLE
  info -f doc/cuirass.info "Contributing"
#+END_EXAMPLE