language: rust

sudo: false

addons:
  apt:
    packages:
      # for building MPI libraries
      - build-essential
      - gfortran
      # bindgen dependency
      - libclang-3.4-dev
      # travis-cargo dependencies
      - libcurl4-openssl-dev
      - libelf-dev
      - libdw-dev

rust:
  - stable
  # - beta

env:
  matrix:
    - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.1.4
    # - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.0.4
    # - MPI_LIBRARY=openmpi MPI_LIBRARY_VERSION=1.8.7
  global:
    - LIBCLANG_PATH=/usr/lib/llvm-3.4/lib

install:
  - sh ci/install-mpi.sh
  - export PATH="${HOME}/opt/${MPI_LIBRARY}-${MPI_LIBRARY_VERSION}/bin:${PATH}"
  - |
      pip install 'travis-cargo<0.2' --user &&
      export PATH="${HOME}/.local/bin:${PATH}"

script:
  - |
      travis-cargo build &&
      travis-cargo test &&
      travis-cargo --only stable doc

cache:
  directories:
    - $HOME/opt

language: rust

sudo: false

addons:
  apt:
    packages:
      # for building MPI libraries
      - build-essential
      - gfortran
      # bindgen dependency
      - libclang-3.4-dev
      # travis-cargo dependencies
      - libcurl4-openssl-dev
      - libelf-dev
      - libdw-dev

rust:
  - stable
  # - beta

env:
  matrix:
    - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.1.4
    # - MPI_LIBRARY=mpich MPI_LIBRARY_VERSION=3.0.4
    # - MPI_LIBRARY=openmpi MPI_LIBRARY_VERSION=1.8.7
  global:
    - LIBCLANG_PATH=/usr/lib/llvm-3.4/lib

install:
  - sh ci/install-mpi.sh
  - export MPI_PREFIX="${HOME}/opt/${MPI_LIBRARY}-${MPI_LIBRARY_VERSION}"
  - export PATH="${MPI_PREFIX}/bin${PATH:+":${PATH}"}"
  - export LD_LIBRARY_PATH="${MPI_PREFIX}/lib${LD_LIBRARY_PATH:+":${LD_LIBRARY_PATH}"}"
  - |
      pip install 'travis-cargo<0.2' --user &&
      export PATH="${HOME}/.local/bin:${PATH}"

script:
  - |
      travis-cargo build &&
      travis-cargo test &&
      travis-cargo --only stable doc

cache:
  directories:
    - $HOME/opt

Set LD_LIBRARY_PATH in CI script.
Set LD_LIBRARY_PATH in CI script.
