# Copyright (C) 2016 Branden Archer <b.m.archer4@gmail.com>
# Copyright (C) 2016 Joshua D. Boyd <jdboyd@jdboyd.net>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.


language: c

os:
  - linux
  - osx

compiler:
  - gcc
  - clang

env:
  - USE_CMAKE=YES
  - USE_CMAKE=NO

addons:
  apt:
    packages:
      - texinfo

matrix:
  exclude:
  # There have been sporadic unit test failures with
  # timeout tests on OSX using CMake. Until these are
  # resolved, skipping these tests.
  - os: osx
    env: USE_CMAKE=YES

script:
  - mkdir build
  - cd build
  - if [ $USE_CMAKE == 'YES' ] ; then cmake .. ; fi
  - if [ $USE_CMAKE == 'NO' ] ; then pushd .. ; autoreconf -i ; popd; fi
  - if [ $USE_CMAKE == 'NO' ] ; then ../configure ; fi
  - make
  - if [ $USE_CMAKE == 'YES' ] ; then ctest -V ; fi
  - if [ $USE_CMAKE == 'NO' ] ; then make check ; fi
