language: c
cache:
    ccache: true
    directories:
        - $HOME/Library/Caches/Homebrew
branches:
    except:
        - /appveyor.*/

os: osx
osx_image: xcode9.2

matrix:
  include:
    - env: TOOL=meson
    - env: TOOL=autotools

install:
    - brew update
    - HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache meson

script:
    - ./test/scripts/build-travis-osx.sh $TOOL
    - ccache -s

before_cache:
    - brew cleanup
