-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
88 lines (84 loc) · 2.73 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright (c) 2017-2020 Michael C. Heiber
# This source file is part of the Excimontec project, which is subject to the MIT License.
# For more information, see the LICENSE file that accompanies this software.
# The Excimontec project can be found on Github at https://github.com/MikeHeiber/Excimontec
# Travis CI continuous integration build script
language: cpp
sudo: required
matrix:
include:
- os: linux
dist: xenial
compiler: gcc
env:
- OPTIONS="GCC_VERSION=default && MPI=openmpi && TARGET=test_coverage"
- os: linux
dist: xenial
compiler: gcc
env:
- OPTIONS="GCC_VERSION=5 && MPI=openmpi && TARGET=test"
- os: linux
dist: xenial
compiler: gcc
env:
- OPTIONS="GCC_VERSION=6 && MPI=openmpi && TARGET=test"
- os: linux
dist: xenial
compiler: gcc
env:
- OPTIONS="GCC_VERSION=7 && MPI=openmpi && TARGET=test"
- os: linux
dist: xenial
compiler: gcc
env:
- OPTIONS="GCC_VERSION=8 && MPI=openmpi && TARGET=test"
- os: linux
dist: xenial
compiler: gcc
env:
- OPTIONS="GCC_VERSION=9 && MPI=openmpi && TARGET=test"
- os: linux
dist: xenial
compiler: gcc
env:
- OPTIONS="GCC_VERSION=default && MPI=mpich && TARGET=test"
- os: linux
dist: bionic
compiler: gcc
env:
- OPTIONS="GCC_VERSION=default && MPI=mpich && TARGET=test"
- os: linux
dist: xenial
compiler: clang
env:
- OPTIONS="MPI=openmpi && TARGET=test"
- os: linux
dist: xenial
compiler: clang
env:
- OPTIONS="MPI=mpich && TARGET=test"
before_install:
- eval "${OPTIONS}"
- |
if [ $TRAVIS_COMPILER == gcc ]; then
if [ $GCC_VERSION != default ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -qq
sudo apt-get install -qq g++-$GCC_VERSION -y
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-$GCC_VERSION 50
g++ --version
fi
fi
- |
if [ $TRAVIS_COMPILER == clang ]; then
export OMPI_CXX=clang++
export CXX=clang++
fi
- if [[ "$MPI" = mpich ]]; then sudo apt-get -y install -qq mpich libmpich-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 30 ./test/Excimontec_tests.exe
- if [[ "$TARGET" = test_coverage ]]; then coveralls --include src --gcov-options '\-lp'; fi
- if [[ "$TARGET" = test ]]; then make -j10 && mpiexec -n 4 ./Excimontec.exe parameters_default.txt; fi