Overview and quick start
CL-TRAVIS helps you test your Common Lisp projects with Travis and many different Lisp implementations: ABCL, Allegro CL, SBCL, CMUCL, CCL and ECL.
Using it is simple, you don't even have to clone this repository:
- Grab the sample
.travis.ymlfile or one from the examples below
- Modify it to test your own project
- Push it to the root of your project's repository and enable Travis from your GitHub account.
Setting up target Lisps
In the first part of your
.travis.yml file, use environment
variables to setup test environments. The most important one is
LISP. CL-TRAVIS uses it find out which Lisp implementation to
install for you. You can use additional variables and specify that
some environments are allowed to fail. See Travis's instructions
for more possibilities.
env: matrix: - LISP=allegro - "LISP=sbcl FOO=baz" - "LISP=ccl FOO=bar" matrix: allow_failures: - env: LISP=allegro
In the second part of the
.travis.yml file, pull in any dependencies
of your project and use shell commands to run tests.
CL-TRAVIS ensures that CIM and Quicklisp are installed, which
means you can conveniently run Lisp code from shell-script snippets in
.travis.yml files, using the CIM's
cl command, grabbing any
dependencies via Quicklisp's
Also, ASDF is set up to look for system definitions recursively within
your project repository and within the
~/lisp directory, so
asdf:load-system) will find these before any
Here's an example that tests babel against the bleeding edge versions of trivial-features and alexandria but grabs its remaining dependencies through Quicklisp.
install: - curl -L https://github.com/luismbo/cl-travis/raw/master/install.sh | sh - git clone --depth=1 git://github.com/trivial-features/trivial-features.git ~/lisp/trivial-features - git clone git://common-lisp.net/projects/alexandria/alexandria.git ~/lisp/alexandria script: - cl -e '(ql:quickload :babel-tests) (unless (babel-tests:run) (uiop:quit 1))'
Here's a list of
.travis.yml files from various projects using CL-TRAVIS: