### ----------------------------------------------------
### -- GTK::Simpler
### -- Licenses: MIT
### -- Authors: 
### -- File: .travis.yml
### ----------------------------------------------------
language: perl6

os:
  - linux
  - osx

perl6:
  - 2016.11
  - latest

before_install:
  - echo $TRAVIS_OS_NAME
  # Install GTK 3 development libraries
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq update           ; fi
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install libgtk-3-dev ; fi
  # Start xvfb for GTK headless testing and give it some time to start
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then export DISPLAY=:99.0         ; fi
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sh -e /etc/init.d/xvfb start ; fi
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sleep 3                      ; fi
  # For macOS
  - if [ "$TRAVIS_OS_NAME" == "osx"   ]; then brew update                       ; fi
  - if [ "$TRAVIS_OS_NAME" == "osx"   ]; then brew install gtk+3                ; fi

install:
  - rakudobrew build zef
  - zef --depsonly install .
  - zef install Test::META
  - zef build .

script:
    - AUTHOR_TESTING=1 prove -ve "perl6 -Ilib"
    - zef install .


