Gitlab CI is based on Docker. With image we tell it to use the
daewok/lisp-devel
one. It includes SBCL, ECL, CCL and ABCL, and Quicklisp is installed
in the home (/home/lisp/), so we can quickload packages right
away. If you’re interested it also has a more bare bones option. Gitlab will load the
image, clone our project and put us at the project root with
administrative rights to run the rest of the commands.

test is a “job” we define, script is a
recognized keywords that takes a list of commands to run.

Suppose we must install dependencies before running our tests:
before_script will run before each job. Here we clone a library
where Quicklisp can find it, and for doing so we must install git
(Docker images are usually pretty bare bones).

We can try locally ourselves. If we already installed Docker and
started its daemon (sudo service docker start), we can do:

Here we defined two stages (see
environments),
“test” and “build”, defined to run one after another. A “build” stage
will start only if the “test” one succeesds.

“build” is asked to run only when a
new tag is pushed, not at every commit. When it succeeds, it will make
the files listed in artifacts’s paths available for download. We can
download them from Gitlab’s Pipelines UI, or with an url. This one will download
the file “some-file-name” from the latest “build” job: