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=no
      rust: nightly
    - os: linux
      env: GNUPLOT=yes
      addons:
        apt:
          packages:
            - gnuplot
    - os: linux
      env: GNUPLOT=yes
      rust: nightly
      addons:
        apt:
          packages:
            - gnuplot
    - os: linux
      env: GNUPLOT=yes
      rust: 1.23.0
      addons:
        apt:
          packages:
            - gnuplot
    - os: linux
      env: HTML_REPORTS=no GNUPLOT=yes
      rust: 1.20.0
      addons:
        apt:
          packages:
            - gnuplot
    - os: linux
      env: CLIPPY=yes
      rust: nightly-2018-06-25
    - os: linux
      env: RUSTFMT=yes
      rust: nightly-2018-03-29
    - os: linux
      env: DOCS=yes
    - os: osx
      env: GNUPLOT=no
    - os: osx
      env: GNUPLOT=yes
    - os: osx
      env: GNUPLOT=no
      rust: nightly
    - os: osx
      env: GNUPLOT=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:
    - CLIPPY_VERSION=0.0.210
    - secure: "f/HaMzQu7d6ochSjE5lUjJbXYWlhbzslyTuWq+Lub/r2TTL4hVlT9koC4RT7W73V3WDrwYIqEGmwvscVffnijZRebl/PV+6WlOlYJEdAgKxGROpFGDIJGRGAc/f3s6OcJ+Hr8rmRF70fYEl45hs6J53X8s+CVRuty+r/UdilRpM="

branches:
  only: master

notifications:
  email:
    on_success: never
