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