-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
303 lines (275 loc) · 8.06 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# This file is part of P^nMPI.
#
# Copyright (c)
# 2008-2019 Lawrence Livermore National Laboratories, United States of America
# 2011-2016 ZIH, Technische Universitaet Dresden, Federal Republic of Germany
# 2013-2019 RWTH Aachen University, Federal Republic of Germany
#
#
# P^nMPI is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation version 2.1 dated February 1999.
#
# P^nMPI is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with P^nMPI; if not, write to the
#
# Free Software Foundation, Inc.
# 51 Franklin St, Fifth Floor
# Boston, MA 02110, USA
#
#
# Written by Martin Schulz, [email protected].
#
# LLNL-CODE-402774
language: c
git:
depth: 1000
# Install all main dependencies for Linux. Additional compilers may be installed
# as defined in the build matrix.
addons:
apt:
sources: &apt_sources
- kalakris-cmake
packages: &apt_packages
- gfortran
- cmake
- libopenmpi-dev
- openmpi-bin
- binutils-dev
- doxygen
- help2man
jobs:
include:
# Compliance checks
#
# Check the compliance of the code first. If the code doesn't follow the
# coding standards, there is no sense in checking it, as the commit will be
# rejected anyway.
# Check coding convention.
- stage: compiliance
os: linux
dist: trusty
sudo: false
env:
FORMAT
addons:
apt:
sources:
- llvm-toolchain-trusty
packages:
- clang-format-3.8
git:
submodules: false
depth: 9999999
before_script:
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch
script:
- >
git filter-branch --force --tree-filter '
find . \( -name "*.c" -o -name "*.cpp" -o -name "*.h" \)
-not -path "./externals/*"
-exec clang-format-3.8 -style=file -fallback-style=none -i {} \; ;
if test $(git diff | wc -l) -gt 0;
then
echo "";
git --no-pager diff --color=always;
exit 1;
fi
' --tag-name-filter cat origin/master~1..HEAD
after_success:
# Check license in all files.
- os: linux
env:
LICENSE_HEADER
addons:
apt:
git:
submodules: false
depth: 9999999
before_script:
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
- git fetch
script:
- >
git filter-branch --force --tree-filter '
num=$(wc -l extra/license/header.c | sed "s/[^0-9]*//g") ;
find . \( -name "*.c" -o -name "*.cpp" -o -name "*.h"
-o -name "*.c.w" -o -name "*.h.w" -o -name "*.h.in" \)
-exec sh -c "cat {}
| head -n $num
| git diff --no-index -- extra/license/header.c -
|| (
echo \"\";
echo \"{} does not contain a valid license header.\";
echo 1 > error
)" \; ;
num=$(wc -l extra/license/header.txt | sed "s/[^0-9]*//g") ;
find . \( -name "*.txt" -o -name "*.conf" -o -name "*.yml"
-o -name "*.cmake" -o -name "*.cmake.in" \)
! -path "./cmakemodules/legacy/*"
! -path "./cmakemodules/Platform/*"
! -path "./cmakemodules/Toolchain/*"
! -path "./cmakemodules/FindBFD.cmake"
-exec sh -c "cat {}
| head -n $num
| git diff --no-index -- extra/license/header.txt -
|| (
echo \"\";
echo \"{} does not contain a valid license header.\";
echo 1 > error
)" \; ;
find . \( -name "*.sh" \)
-exec sh -c "cat {}
| head -n $((num + 2)) | tail -n $num
| git diff --no-index -- extra/license/header.txt -
|| (
echo \"\";
echo \"{} does not contain a valid license header.\";
echo 1 > error
)" \; ;
test \! -f error ;
' --tag-name-filter cat origin/master~1..HEAD
after_success:
# Regular builds for OpenMPI.
#
# Check PnMPI builds for numerous versions of Linux with OpenMPI.
# Ubuntu Trusty (14.04 LTS) GCC builds.
- stage: build OpenMPI
os: linux
dist: trusty
sudo: false
compiler: gcc-4.6
addons:
apt:
sources: *apt_sources
packages:
- *apt_packages
- gcc-4.6
- g++-4.6
- gfortran-4.6
before_script:
- export CC=gcc-4.6; export CXX=g++-4.6; export FC=gfortran-4.6
- os: linux
dist: trusty
sudo: false
compiler: gcc-4.7
addons:
apt:
sources: *apt_sources
packages:
- *apt_packages
- gcc-4.7
- g++-4.7
- gfortran-4.7
before_script:
- export CC=gcc-4.7; export CXX=g++-4.7; export FC=gfortran-4.7
- os: linux
dist: trusty
sudo: false
compiler: gcc-4.8
before_script:
- export CC=gcc-4.8; export CXX=g++-4.8; export FC=gfortran-4.8
# Clang builds for Precise and Trusty.
- os: linux
dist: trusty
sudo: false
compiler: clang-3.4
before_script:
- export CC=clang; export CXX=clang++
- os: linux
dist: trusty
sudo: false
compiler: clang-3.5
before_script:
- export CC=clang; export CXX=clang++
# Specialized builds.
#
# Test some special configurations for PnMPI that influence the behavior of
# PnMPI and its test cases.
# Build without Fortran.
- stage: build specialized
os: linux
dist: trusty
compiler: gcc
sudo: false
before_script:
- export CMAKE_EXTRA_FLAGS="-DENABLE_FORTRAN=off"
env:
- NO_FORTRAN
# Build with adept-utils.
#
# NOTE: Some of the compiler warnings will not be converted to errors, as
# they origin from third-party code of adept-utils. However, PnMPI
# will be checked with the all compiler flags in the other jobs.
- os: linux
dist: trusty
compiler: gcc
sudo: false
before_script:
- export CMAKE_EXTRA_FLAGS="-DENABLE_ADEPT_UTILS=on"
- export CFLAGS="-Wno-error=format -Wno-error=return-type"
env:
- WITH_ADEPT
# Build without PnMPIze.
- os: linux
dist: trusty
compiler: gcc
sudo: false
before_script:
- export CMAKE_EXTRA_FLAGS="-DENABLE_PNMPIZE=off"
env:
- WITHOUT_PNMPIZE
# Build with optimized configuration.
- os: linux
dist: trusty
compiler: gcc
sudo: false
before_script:
- >
export CMAKE_EXTRA_FLAGS="
-DENABLE_DEBUG=OFF
-DENABLE_THREAD_SAFETY=OFF
-DCMAKE_BUILD_TYPE=Release
"
env:
- OPTIMIZED
# Build with Python 3 instead of the default Python 2 installed in Travis.
- os: linux
dist: trusty
compiler: gcc
sudo: false
before_script:
- export CMAKE_EXTRA_FLAGS="-DPYTHON_EXECUTABLE=$(which python3)"
env:
- PYTHON_3
# Deploy checks
#
# Check release packaging. This will only package the current version,
# unpack and change into this directory. The build will be done by the
# default script below.
- stage: deploy
os: linux
dist: trusty
sudo: false
compiler: gcc
env:
- DEPLOY
before_script:
- mkdir build && cd build
- cmake ..
- make package_deploy
- tar xfvz *.tar.gz
- cd $(echo PnMPI-*)
script:
- ../../extra/build/ci.sh
script:
- extra/build/ci.sh
after_success:
- cd travis; make -k gcov
- bash <(curl -s https://codecov.io/bash) -X gcov