-
Notifications
You must be signed in to change notification settings - Fork 27
/
.travis.yml
149 lines (141 loc) · 4.53 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
language: cpp
branches:
only:
- master
- develop
cache:
directories:
- openmpi
- openmpi-2.0.1
# setup build matrix
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5 gcc-5 libstdc++-5-dev
env:
- CXX_COMPILER=g++-5
- C_COMPILER=gcc-5
- BUILD_TYPE=release
- AITHER_INSTALL_DIRECTORY=$TRAVIS_BUILD_DIR/build/install
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6 gcc-6 libstdc++-6-dev lcov
env:
- CXX_COMPILER=g++-6
- C_COMPILER=gcc-6
- BUILD_TYPE=debug
- AITHER_INSTALL_DIRECTORY=$TRAVIS_BUILD_DIR/build/install
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7 gcc-7 libstdc++-7-dev
env:
- CXX_COMPILER=g++-7
- C_COMPILER=gcc-7
- BUILD_TYPE=release
- AITHER_INSTALL_DIRECTORY=$TRAVIS_BUILD_DIR/build/install
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8 gcc-8 libstdc++-8-dev
env:
- CXX_COMPILER=g++-8
- C_COMPILER=gcc-8
- BUILD_TYPE=release
- AITHER_INSTALL_DIRECTORY=$TRAVIS_BUILD_DIR/build/install
- os: linux
dist: trusty
sudo: required
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
packages:
- clang++-8 clang-8 libc++-dev libc++abi-dev
env:
- CXX_COMPILER=clang++-8
- C_COMPILER=clang-8
- BUILD_TYPE=release
- AITHER_INSTALL_DIRECTORY=$TRAVIS_BUILD_DIR/build/install
- os: osx
osx_image: xcode11
compiler: gcc
env:
- CXX_COMPILER=g++-8
- C_COMPILER=gcc-8
- HOMEBREW_CC=gcc-8
- HOMEBREW_CXX=g++-8
- BUILD_TYPE=release
- AITHER_INSTALL_DIRECTORY=$TRAVIS_BUILD_DIR/build/install
- os: osx
osx_image: xcode11
compiler: clang
env:
- CXX_COMPILER=clang++
- C_COMPILER=clang
- HOMEBREW_CC=clang
- HOMEBREW_CXX=clang++
- BUILD_TYPE=release
- AITHER_INSTALL_DIRECTORY=$TRAVIS_BUILD_DIR/build/install
# upgrade packages
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y python3; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gcc@8; fi
- test -n $CC && unset CC
- test -n $CXX && unset CXX
- which $CXX_COMPILER
# install mpi
install:
- bash ci/travis/installMPI
before_script:
- mkdir build
- cd build
- if [[ "$BUILD_TYPE" == "debug" ]]; then lcov --directory . --zerocounters; fi
- if [[ "$BUILD_TYPE" == "debug" ]]; then ln -s /usr/bin/gcov-6 gcov; fi
- if [[ "$BUILD_TYPE" == "debug" ]]; then export PATH=$PWD:$PATH; fi
- if [[ "$BUILD_TYPE" == "debug" ]]; then gcov --version; fi
# build instructions
script:
- cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_C_COMPILER=$C_COMPILER -DMPI_DIR=$TRAVIS_BUILD_DIR/openmpi -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=install ..
- make -j 4
- make install
- cd ../testCases
- python3 regressionTests.py --aitherPath=$TRAVIS_BUILD_DIR/build/install/bin/aither --operatingSystem=$TRAVIS_OS_NAME --mpirunPath=$TRAVIS_BUILD_DIR/openmpi/bin/mpirun --build $BUILD_TYPE
- cd $TRAVIS_BUILD_DIR/build
after_success:
- if [[ "$BUILD_TYPE" == "debug" ]]; then lcov --directory . --capture --rc lcov_branch_coverage=1 --output-file coverage.info; fi
- if [[ "$BUILD_TYPE" == "debug" ]]; then lcov --remove coverage.info '/usr/*' '/Applications/*' '/Library/*' --rc lcov_branch_coverage=1 --output-file coverage.info; fi
- if [[ "$BUILD_TYPE" == "debug" ]]; then lcov --rc lcov_branch_coverage=1 --list coverage.info; fi
- if [[ "$BUILD_TYPE" == "debug" ]]; then bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"; fi