### ----------------------------------------------------
### -- OpenCV
### -- Licenses: MIT
### -- Authors: Ahmad M. Zawawi
### -- File: .travis.yml
### ----------------------------------------------------
language: perl6

# Needed to get OpenCV 2.4 libraries
dist: trusty
sudo: required

os:
  - linux
  - osx

perl6:
  - 2017.01
  - latest

before_install:
  - echo $TRAVIS_OS_NAME

  # Install OpenCV development libraries (Linux)
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq update           ; fi
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install libopencv-dev ; fi

  # Install OpenCV development libraries (macOS)
  - if [ "$TRAVIS_OS_NAME" == "osx"   ]; then brew update                       ; fi
  - if [ "$TRAVIS_OS_NAME" == "osx"   ]; then pip uninstall -y numpy            ; fi
  - if [ "$TRAVIS_OS_NAME" == "osx"   ]; then brew tap homebrew/science         ; fi
  - if [ "$TRAVIS_OS_NAME" == "osx"   ]; then brew install opencv               ; fi

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

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


