|
| 1 | +# Copyright (c) 2014-2018 Michael C. Heiber |
| 2 | +# This source file is part of the Ising_OPV project, which is subject to the MIT License. |
| 3 | +# For more information, see the LICENSE file that accompanies this software. |
| 4 | +# The Ising_OPV project can be found on Github at https://github.com/MikeHeiber/Ising_OPV |
| 5 | +# Travis CI continuous integration build script |
| 6 | + |
| 7 | +language: cpp |
| 8 | +os: linux |
| 9 | +dist: trusty |
| 10 | +sudo: required |
| 11 | + |
| 12 | +compiler: |
| 13 | + - gcc |
| 14 | + |
| 15 | +env: |
| 16 | + - OPTIONS="GCC_VERSION=5 && MPI=openmpi && TARGET=test_coverage" |
| 17 | + - OPTIONS="GCC_VERSION=4.7 && MPI=mpich2 && TARGET=test" |
| 18 | + - OPTIONS="GCC_VERSION=4.7 && MPI=openmpi && TARGET=test" |
| 19 | + - OPTIONS="GCC_VERSION=4.8 && MPI=mpich2 && TARGET=test" |
| 20 | + - OPTIONS="GCC_VERSION=4.8 && MPI=openmpi && TARGET=test" |
| 21 | + - OPTIONS="GCC_VERSION=4.9 && MPI=mpich2 && TARGET=test" |
| 22 | + - OPTIONS="GCC_VERSION=4.9 && MPI=openmpi && TARGET=test" |
| 23 | + - OPTIONS="GCC_VERSION=5 && MPI=mpich2 && TARGET=test" |
| 24 | + - OPTIONS="GCC_VERSION=5 && MPI=openmpi && TARGET=test" |
| 25 | + - OPTIONS="GCC_VERSION=6 && MPI=mpich2 && TARGET=test" |
| 26 | + - OPTIONS="GCC_VERSION=6 && MPI=openmpi && TARGET=test" |
| 27 | + - OPTIONS="GCC_VERSION=7 && MPI=mpich2 && TARGET=test" |
| 28 | + - OPTIONS="GCC_VERSION=7 && MPI=openmpi && TARGET=test" |
| 29 | + - OPTIONS="GCC_VERSION=8 && MPI=mpich2 && TARGET=test" |
| 30 | + - OPTIONS="GCC_VERSION=8 && MPI=openmpi && TARGET=test" |
| 31 | + |
| 32 | +before_install: |
| 33 | + - eval "${OPTIONS}" |
| 34 | + - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y |
| 35 | + - sudo apt-get update -qq |
| 36 | + - sudo apt-get install -qq gcc-$GCC_VERSION g++-$GCC_VERSION -y |
| 37 | + - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$GCC_VERSION 60 --slave /usr/bin/g++ g++ /usr/bin/g++-$GCC_VERSION |
| 38 | + - sudo update-alternatives --config gcc |
| 39 | + - gcc --version |
| 40 | + - if [[ "$MPI" = mpich2 ]]; then sudo apt-get -y install -qq mpich2 libmpich2-dev; fi |
| 41 | + - if [[ "$MPI" = openmpi ]]; then sudo apt-get -y install -qq openmpi-bin libopenmpi-dev; fi |
| 42 | + - if [[ "$TARGET" = test_coverage ]]; then pip install --user cpp-coveralls; fi |
| 43 | + |
| 44 | +script: |
| 45 | + - make -j10 $TARGET |
| 46 | + - cd test |
| 47 | + - travis_wait ./Ising_OPV_tests.exe |
| 48 | + - cd .. |
| 49 | + - if [[ "$TARGET" = test_coverage ]]; then coveralls --include src --exclude "googletest/*" --gcov-options '\-lp'; fi |
| 50 | + - if [[ "$TARGET" = test ]]; then make -j10 && mpiexec -n 4 ./Ising_OPV.exe parameters_default.txt; fi |
0 commit comments