sudo: false

language: rust

cache: cargo

rust:
  - stable

os:
  - linux
  - osx

matrix:
  # Clear the whole matrix
  exclude:
    - os: linux
    - os: osx
  # Add each target manually
  include:
    - os: linux
      env: GNUPLOT=no
    - os: linux
      env: GNUPLOT=yes
      addons:
        apt:
          packages:
            - gnuplot
    - os: linux
      env: CLIPPY=yes
      rust: stable
    - os: linux
      env: RUSTFMT=yes
      rust: stable
    - os: linux
      env: DOCS=yes
    - os: linux
      env: GNUPLOT=yes
      rust: 1.26.0
      addons:
        apt:
          packages:
            - gnuplot
    - os: linux
      env: HTML_REPORTS=no GNUPLOT=yes
      rust: 1.26.0
      addons:
        apt:
          packages:
            - gnuplot
    - os: linux
      env: GNUPLOT=no
      rust: nightly
    - os: linux
      env: GNUPLOT=yes
      rust: nightly
      addons:
        apt:
          packages:
            - gnuplot
    - os: osx
      env: GNUPLOT=no
    - os: osx
      env: GNUPLOT=yes
    - os: osx
      env: GNUPLOT=no
      rust: nightly
    - os: osx
      env: GNUPLOT=yes
      rust: nightly
    - os: linux
      env: MINIMAL_VERSIONS=yes
      rust: nightly

before_script:
  - if [ "$DOCS" = "yes" ]; then
      pip install 'travis-cargo<0.2' --user;
      export PATH=$HOME/.local/bin:$PATH;
    fi

install:
  - sh ci/install.sh

script:
  - sh ci/script.sh

env:
  global:
    - secure: "f/HaMzQu7d6ochSjE5lUjJbXYWlhbzslyTuWq+Lub/r2TTL4hVlT9koC4RT7W73V3WDrwYIqEGmwvscVffnijZRebl/PV+6WlOlYJEdAgKxGROpFGDIJGRGAc/f3s6OcJ+Hr8rmRF70fYEl45hs6J53X8s+CVRuty+r/UdilRpM="

notifications:
  email:
    on_success: never
