guix-cuirass/README

112 lines
2.9 KiB
Plaintext
Raw Normal View History

2021-01-05 10:20:34 +01:00
-*- mode: org -*-
2016-05-11 19:59:47 +02:00
2021-01-05 10:20:34 +01:00
Cuirass is a continuous integration tool using GNU Guix.
* Requirements
2016-05-11 19:59:47 +02:00
Cuirass currently depends on the following packages:
2016-05-11 19:59:47 +02:00
- GNU Guile 3.0.x or 2.2.x
- GNU Guix (and all its development dependencies)
- GNU Make
- Guile-JSON 3.x
- Guile-Avahi
2021-01-05 10:20:34 +01:00
- Guile-Squee
- Guile-Git
- Guile-zlib
- Guile-Mastodon
- Guile-Simple-ZMQ
- Ephemeral PostgreSQL (for the tests)
- Mailutils
- Fibers
2016-06-16 01:11:57 +02:00
A convenient way to install those dependencies is to install Guix and execute
the following command:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 18:28:59 +01:00
guix environment cuirass
2021-01-05 10:20:34 +01:00
#+END_EXAMPLE
This will build and enter an environment which provides all the necessary
dependencies.
2021-01-05 10:20:34 +01:00
* Build Instructions
When all the dependencies are available on you system, in order to build
Cuirass, you can proceed with the usual:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 18:28:59 +01:00
./bootstrap && ./configure && make
2021-01-05 10:20:34 +01:00
#+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
2021-03-22 11:57:46 +01:00
./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:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 11:57:46 +01:00
./pre-inst-env cuirass register --database="dbname=cuirass host=/var/run/postgresql"
2021-01-05 10:20:34 +01:00
#+END_EXAMPLE
To use a TCP connection, one can use:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 11:57:46 +01:00
./pre-inst-env cuirass register --database="host=127.0.0.1"
2021-01-05 10:20:34 +01:00
#+END_EXAMPLE
* Run tests
2021-03-10 07:48:24 +01:00
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:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 18:28:59 +01:00
make check
2021-01-05 10:20:34 +01:00
#+END_EXAMPLE
2021-01-05 10:20:34 +01:00
* Example
A quick way to manually test Cuirass is to execute:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 11:57:46 +01:00
./pre-inst-env cuirass register --specifications=examples/hello.scm
2021-01-05 10:20:34 +01:00
#+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.
2021-01-05 10:20:34 +01:00
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:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 11:57:46 +01:00
./pre-inst-env cuirass register
2021-01-05 10:20:34 +01:00
#+END_EXAMPLE
To start the web interface run:
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
2021-03-22 11:57:46 +01:00
./pre-inst-env cuirass web
2021-01-05 10:20:34 +01:00
#+END_EXAMPLE
2021-01-05 10:20:34 +01:00
* Contributing
See the manual for useful hacking informations, by running
2021-01-05 10:20:34 +01:00
#+BEGIN_EXAMPLE
info -f doc/cuirass.info "Contributing"
2021-01-05 10:20:34 +01:00
#+END_EXAMPLE