-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
194 lines (179 loc) · 5.71 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
# https://travis-ci.org/ParBLiSS/kmerind
language: cpp
sudo: false
#compiler:
# - gcc
# - clang
#different compilers
#env:
# - envCXX=g++-4.8 envCC=gcc-4.8
# - envCXX=g++-4.9 envCC=gcc-4.9
# - envCXX=g++-5 envCC=gcc-5
# - envCXX=clang++-3.5 envCC=clang-3.5
# - envCXX=clang++-3.6 envCC=clang-3.6
# - envCXX=clang++-3.7 envCC=clang-3.7
#addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# packages:
# - openmpi
# - llvm-toolchain-precise-3.5
# - llvm-toolchain-precise-3.6
# - llvm-toolchain-precise-3.7
# include specific compiler combinations combinations
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- openmpi-bin
- libopenmpi-dev
- gcc-4.8
- g++-4.8
env: envCXX=g++-4.8 envCC=gcc-4.8
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- openmpi-bin
- libopenmpi-dev
- gcc-4.9
- g++-4.9
env: envCXX=g++-4.9 envCC=gcc-4.9
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- openmpi-bin
- libopenmpi-dev
- gcc-5
- g++-5
env: envCXX=g++-5 envCC=gcc-5
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
packages:
- openmpi-bin
- libopenmpi-dev
- clang-3.5
env: envCXX=clang++-3.5 envCC=clang-3.5
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
packages:
- openmpi-bin
- libopenmpi-dev
- clang-3.6
env: envCXX=clang++-3.6 envCC=clang-3.6
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- openmpi-bin
- libopenmpi-dev
- clang-3.7
env: envCXX=clang++-3.7 envCC=clang-3.7
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- openmpi-bin
- libopenmpi-dev
- clang-3.8
env: envCXX=clang++-3.8 envCC=clang-3.8
before_install:
- pip install --user codecov
#addons:
# apt:
# sources:
# - ubuntu-toolchain-r-test
# - llvm-toolchain-precise-3.5
# - llvm-toolchain-precise-3.6
# - llvm-toolchain-precise-3.7
# packages:
# - gcc-4.8
# - g++-4.8
# - gcc-4.9
# - g++-4.9
# - gcc-5
# - g++-5
# - clang-3.5
# - clang-3.6
# - clang-3.7
# caching of the whole `local` directory. Can't cache only the one for this
# `env`, because otherwise the different instances will overwrite the cache.
# For the first test-run, the build has to be run sequentially (limit parallel
# workers to 1) so that the cache can be correctly initialized. Once the cache
# is build, parallel workers can be re-enabled.
#cache:
# directories:
# - $HOME/local
before_script:
# check if gcc or clang
- if [ "$CXX" = "clang++" ]; then export COMPILER="clang"; else export COMPILER="gnu"; fi
# # install MPI - only 1 configuration for each compiler does this
- export MPI=openmpi
# set compiler to newer versions
- export CXX="$envCXX" CC="$envCC" OMPI_CC="$envCC" OMPI_CXX="$envCXX"
# set up MPI location
- export PATH=$PATH:$HOME/local/$MPI/bin
- export LIBRARY_PATH=$LIBRARY_PATH:$HOME/local/$MPI/lib
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/$MPI/lib
# print out version information
- $CXX --version
- mpiexec --version
- export SRC_DIR=`pwd`
# compile sparsehash
- cd ext/sparsehash
- ./configure CXXFLAGS=-std=c++11
- make
- cd $SRC_DIR
# prepare build kmerind
- mkdir build
- cd build
# first pass cmake
- if [ "$COMPILER" = "clang" ]; then cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=ON -DLOG_ENGINE=PRINTF -DUSE_MPI=ON -DUSE_OPENMP=OFF -DUSE_SIMD_IF_AVAILABLE=ON -DENABLE_BENCHMARKING=OFF ../;
else cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTING=ON -DLOG_ENGINE=PRINTF -DUSE_MPI=ON -DUSE_OPENMP=ON -DUSE_SIMD_IF_AVAILABLE=ON -DENABLE_BENCHMARKING=OFF ../; fi
# do it again else the gtests will not be built
- if [ "$COMPILER" = "clang" ]; then cmake -DBUILD_TEST_APPLICATIONS=ON -DENABLE_COVERAGE=OFF ../;
else cmake -DBUILD_TEST_APPLICATIONS=ON -DENABLE_COVERAGE=ON ../; fi
# build kmerind. here so that if build fails, the tests are not run.
- make
script:
# run tests.
- make test
- ./bin/testFASTA_load
- mpiexec -np 4 ./bin/testFASTA_load
- ./bin/testFASTQ_load
- mpiexec -np 4 ./bin/testFASTQ_load
- ./bin/testKmerIndex-fasta
- mpiexec -np 4 ./bin/testKmerIndex-fasta
- ./bin/testKmerIndex-fastq
- mpiexec -np 4 ./bin/testKmerIndex-fastq
- ./bin/test_de_bruijn_graph_construction
- mpiexec -np 4 ./bin/test_de_bruijn_graph_construction
after_success:
# only collect coverage if compiled with gcc
#- if [ "$CXX" = "g++-4.8" ]; then codecov --comp ${SRC_DIR}/config/comp.txt --gcov-exec gcov-4.8; fi
#- if [ "$CXX" = "g++-4.9" ]; then codecov --comp ${SRC_DIR}/config/comp.txt --gcov-exec gcov-4.9; fi
- if [ "$CXX" = "g++-5" ]; then codecov --gcov-exec gcov-5; fi