language: python
python: 3.5

os:   linux
dist: trusty
sudo: required

env:
  global:
    - HYDRA_LAUNCHER=fork
    - secure: "tyStcaj+p8Ix1Ze2Hb4NdosUaUP/4LW0GHpz2YkybELSzx9/RS6dRUGzJUj7dmIPKE839trVBjjt1+/e+i5HvUumLX0TCUodpunu5kUb0f/hajsKCJKP78DcBsQZUWed/oeFrxFd8VYwp6gVO3jDqJrnQKwx/7w3OfV1jWF8ryHd2m4CKXi7YNoMxsPSAWWW22CxMc39sdU5GPIf1MP5pjuXW2LZDl7urz1LxmlQ3g+POkAipI38h3BU3M8MvLHfUJ7DJuJwPogUWy50Q535qQ9Gm1ekzkfi/mp610MfTVe/lpWsKIpkQXgrkOvLNN5mwVbPV5uEToKiW1vsd7GLO/ymnqIhphqW5LefktfGiEEaUWeTEEFliV+4Auig+pqWL0l8BwU28iMsFOjws5gUupYrirU0J5lbBWTGA4wnqY2bbarVAggKmbFGyiQjQR/8NkWUpCxMXyyMEn11S6a8jvb4ZcdTGJMAHEGKSpjqgcv6S+yBU05KLQHXgKiqawAYc/VH2ssnZNiXWpgbOOsdu7rR+dkoZK1Yh1FMvv4Vvk3SLkvhJZssT7UevFXqOIJngH35fmXD3SQkB0KVLnD8ZTNa4tmOlXForb1SiV5JhGQ47OAZJNVatljqvsIogB1JCLiutmb0z/henTleqALpSxvCiZyyNdlm/i9bsIaUnKs="
  matrix:
    - BUILD_DOCS=1

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-5
      - g++-7
      - doxygen

before_script:
  - if [[ -z $BUILD_DOCS ]]; then
        sh conf/ci/travis-ci/install-mpi.sh $MPI;
        mkdir build;
        cd build;
        if [[ "$MPI" == "none" ]]; then
            cmake -DCMAKE_CXX_COMPILER=$COMPILER -Dmpi=OFF ..;
        else
            cmake -DCMAKE_CXX_COMPILER=$COMPILER ..;
        fi;
        make;
    fi

script:
  - if [[ -z $BUILD_DOCS ]]; then
        ctest --output-on-failure -E simple-test;
    else
        sh conf/ci/travis-ci/build-docs.sh;
    fi
  # simple-test uses more memory than Travis-CI has to offer
