forked from MikeHeiber/KMC_Lattice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (41 loc) · 2.25 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
# Copyright (c) 2017-2019 Michael C. Heiber
# This source file is part of the KMC_Lattice project, which is subject to the MIT License.
# For more information, see the LICENSE file that accompanies this software.
# The KMC_Lattice project can be found on Github at https://github.com/MikeHeiber/KMC_Lattice
# 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=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:
- make -j10 $TARGET && travis_wait ./test/KMC_Lattice_tests.exe && travis_wait mpiexec -n 4 ./test/KMC_Lattice_MPI_tests.exe
- if [[ "$TARGET" = test_coverage ]]; then coveralls --include src --exclude "googletest/*" --gcov-options '\-lp'; fi