matrix:
  include:
    - os: linux
      dist: bionic
      addons:
        apt:
          packages:
            - libncurses-dev
            - libxaw7-dev
            - libxmu-dev
            - libxpm-dev
            - xaw3dg-dev
            - tcl-dev
            - iraf-dev
            - xauth
            - xvfb
      env: OSI_COMPLIANT=YES
    - os: osx
      osx_image: xcode11.5

language: c

cache:
  ccache: true
  directories:
    - $HOME/.ccache

git:
  depth: 3

before_script:
  - make

script:
  - test -x xgterm/xgterm
  - test -x ximtool/ximtool
  - test "${TRAVIS_OS_NAME}" = osx -o -x ximtool/clients/ism_wcspix.e
  - if [ "${TRAVIS_OS_NAME}" = linux ]; then xvfb-run xgterm/xgterm -e sleep 1; fi
  - if [ "${TRAVIS_OS_NAME}" = osx ]; then xgterm/xgterm -e sleep 1; fi
