|
| 1 | +language: cpp |
| 2 | +matrix: |
| 3 | + include: |
| 4 | + - os: linux |
| 5 | + addons: |
| 6 | + apt: |
| 7 | + sources: |
| 8 | + - ubuntu-toolchain-r-test |
| 9 | + packages: |
| 10 | + - g++-4.9 |
| 11 | + env: COMPILER=gcc GCC=4.9 |
| 12 | + - os: linux |
| 13 | + addons: |
| 14 | + apt: |
| 15 | + sources: |
| 16 | + - ubuntu-toolchain-r-test |
| 17 | + packages: |
| 18 | + - g++-5 |
| 19 | + env: COMPILER=gcc GCC=5 |
| 20 | + - os: linux |
| 21 | + addons: |
| 22 | + apt: |
| 23 | + sources: |
| 24 | + - ubuntu-toolchain-r-test |
| 25 | + - llvm-toolchain-precise-3.6 |
| 26 | + packages: |
| 27 | + - clang-3.6 |
| 28 | + env: COMPILER=clang CLANG=3.6 |
| 29 | + - os: linux |
| 30 | + addons: |
| 31 | + apt: |
| 32 | + sources: |
| 33 | + - ubuntu-toolchain-r-test |
| 34 | + - llvm-toolchain-precise-3.7 |
| 35 | + packages: |
| 36 | + - clang-3.7 |
| 37 | + env: COMPILER=clang CLANG=3.7 |
| 38 | + - os: osx |
| 39 | + osx_image: xcode8 |
| 40 | + compiler: clang |
| 41 | +env: |
| 42 | + global: |
| 43 | + - MINCONDA_VERSION="latest" |
| 44 | + - MINCONDA_LINUX="Linux-x86_64" |
| 45 | + - MINCONDA_OSX="MacOSX-x86_64" |
| 46 | +install: |
| 47 | + # Define the version of miniconda to download |
| 48 | + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then |
| 49 | + MINCONDA_OS=$MINCONDA_LINUX; |
| 50 | + elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then |
| 51 | + MINCONDA_OS=$MINCONDA_OSX; |
| 52 | + fi |
| 53 | + - wget "http://repo.continuum.io/miniconda/Miniconda3-$MINCONDA_VERSION-$MINCONDA_OS.sh" -O miniconda.sh; |
| 54 | + - bash miniconda.sh -b -p $HOME/miniconda |
| 55 | + - export PATH="$HOME/miniconda/bin:$PATH" |
| 56 | + - hash -r |
| 57 | + - conda config --set always_yes yes --set changeps1 no |
| 58 | + - conda update -q conda |
| 59 | + # Useful for debugging any issues with conda |
| 60 | + - conda info -a |
| 61 | + - cd test |
| 62 | + - conda install xtensor nose numpy -c conda-forge |
| 63 | + - pip install git+https://github.com/pybind/pybind11.git |
| 64 | + - cp -r $TRAVIS_BUILD_DIR/include/* $HOME/miniconda/include/ |
| 65 | + |
| 66 | +script: |
| 67 | + - | |
| 68 | + # Configure build variables |
| 69 | + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then |
| 70 | + if [[ "$COMPILER" == "gcc" ]]; then |
| 71 | + export CXX=g++-$GCC CC=gcc-$GCC; |
| 72 | + fi |
| 73 | + if [[ "$COMPILER" == "clang" ]]; then |
| 74 | + export CXX=clang++-$CLANG CC=clang-$CLANG; |
| 75 | + fi |
| 76 | + elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then |
| 77 | + export CXX=clang++ CC=clang; |
| 78 | + fi |
| 79 | + - nosetests . |
0 commit comments