name: test

on:
  push:
  workflow_dispatch:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ matrix.experimental }}
    timeout-minutes: 90
    strategy:
      fail-fast: false
      matrix:
        os: [macos-10.15, ubuntu-18.04]
        lisp: 
         - alisp
         - cmu-bin/2019-06
         - sbcl
         - ecl
         - clisp
         - ccl-bin
         - sbcl/1.4.0
         - ccl32
        experimental: [false]
        include:
          - lisp: mkcl
            os: macos-10.15
            experimental: true
          - lisp: mkcl
            os: ubuntu-18.04
            experimental: true
          - lisp: sbcl/git
            os: macos-10.15
            experimental: true
          - lisp: sbcl/git
            os: ubuntu-18.04
            experimental: true
          - lisp: abcl
            os: macos-10.15
            experimental: true
          - lisp: abcl
            os: ubuntu-18.04
            experimental: true

    env:
      LISP: ${{ matrix.lisp }}
      ROSWELL_REPO: https://github.com/${{ github.repository }}
      ROSWELL_BRANCH: ${{ github.head_ref }}

    steps:
      - uses: actions/checkout@v2
      - name: setenv
        run: |
          echo "$HOME/.roswell/bin" >> $GITHUB_PATH
          echo "ROSWELL_INSTALL_DIR=$HOME/.roswell" >> $GITHUB_ENV
      - name: Install Roswell
        run: |
          sh ./scripts/install-for-ci.sh
      - name: script
        run: |
          ros version
          ros version=t run
          ros install prove
          run-prove roswell-test.asd 2>&1
          ros -q run && [`ros -q run 2>&1` == ""]
          ros config
