language: cpp dist: trusty env: matrix: fast_finish: true include: - os: linux addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-4.9 - libeigen3-dev env: COMPILER=gcc GCC=4.9 - os: linux addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-5 - libeigen3-dev env: COMPILER=gcc GCC=5 - os: linux addons: apt: sources: - ubuntu-toolchain-r-test packages: - g++-6 - libeigen3-dev env: COMPILER=gcc GCC=6 env: global: - MINCONDA_VERSION="latest" - MINCONDA_LINUX="Linux-x86_64" - MINCONDA_OSX="MacOSX-x86_64" before_install: - | # Configure build variables if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$COMPILER" == "gcc" ]]; then export CXX=g++-$GCC CC=gcc-$GCC; fi if [[ "$COMPILER" == "clang" ]]; then export CXX=clang++-$CLANG CC=clang-$CLANG; fi elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CXX=clang++ CC=clang; fi install: # Define the version of miniconda to download - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then MINCONDA_OS=$MINCONDA_LINUX; elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then MINCONDA_OS=$MINCONDA_OSX; fi - wget "http://repo.continuum.io/miniconda/Miniconda3-$MINCONDA_VERSION-$MINCONDA_OS.sh" -O miniconda.sh; - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:${PATH}" - export INCLUDE_PATH="$HOME/miniconda/include:${INCLUDE_PATH}" - hash -r - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda install cmake -c conda-forge - conda install xtl -c conda-forge - conda install xsimd -c conda-forge - conda install xtensor -c conda-forge - conda install nlohmann_json -c conda-forge # build path - mkdir build - cd build # install catch - git clone https://github.com/catchorg/Catch2.git - cd Catch2 - mkdir build - cd build - mkdir opt - cmake .. -DCATCH_BUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX:PATH="${PWD}"/opt - make install - export INCLUDE_PATH="${PWD}"/opt/include:"${INCLUDE_PATH}" - cd ../.. # make test-cases - cmake .. -DBUILD_TESTS=ON - make - cd test script: - ./test