language: common-lisp
sudo: required

env:
  matrix:
    - LISP=abcl-bin
    - LISP=allegro
    - LISP=ccl-bin
    - LISP=clisp
    - LISP=ecl
    - LISP=sbcl-bin

matrix:
  allow_failures:
    - env: LISP=abcl-bin
    - env: LISP=allegro
    - env: LISP=clisp

install:
  - curl -L https://raw.githubusercontent.com/snmsts/roswell/release/scripts/install-for-ci.sh | sh

script:
  # Compiling and testing can fail on Allegro CL Express Free edition
  # because of the 50 MB heap size limitation, so let's try to split
  # the work in two as a possible workaround...
  - if [ "$LISP" = "allegro" ];
    then
      ros -e '(setf *debugger-hook*
                  (lambda (&rest ignorable)
                    (declare (ignore ignorable))
                    (uiop:quit 0)))'
          -e '(ql:quickload "ironclad/tests")';
    else
      true;
    fi
  - ros -e '(setf *debugger-hook*
                  (lambda (&rest ignorable)
                    (declare (ignore ignorable))
                    (uiop:quit -1)))'
        -e '(ql:quickload "ironclad/tests")'
        -e '(unless (rt:do-tests) (uiop:quit -1))'
