-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
95 lines (83 loc) · 2.57 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
# copy from github.com/patflick/mxx/.travis.yml
# modifications:
# - and remove fakebig
# - run our tests
# TODO:
# - have a test-all executable (one for sequential, one for parallel)
language: cpp
sudo: false
compiler:
- gcc
- clang
# TODO: mpich 2, OpenMPI 1.10
env:
- MPI=mpich2 # MPI 2.2
- MPI=mpich3 # MPI 3.0
- MPI=openmpi16 # MPI 2.2
- MPI=openmpi18 # MPI 3.0
# clang fails to compile mpich 3.1.4:
matrix:
exclude:
- compiler: clang
env: MPI=mpich3
before_install:
- pip install --user codecov
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- gcc-4.8
- g++-4.8
- 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:
# set compiler to newer versions
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.7" CC="clang-3.7"; fi
# install MPI
- mkdir -p $HOME/local
- sh ./conf/travis-install-mpi.sh $MPI
- ls -r $HOME/local
# 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
# prepare build mxx
- mkdir build
- cd build
# build with coverage reporting
- cmake -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug -DMPI_C_COMPILER=$HOME/local/$MPI/bin/mpicc -DMPI_CXX_COMPILER=$HOME/local/$MPI/bin/mpicxx ../
script:
# build mxx and run tests
- make
- ./bin/test-rmq
- ./bin/test-bitops
- ./bin/test-psac
- ./bin/test-ansv
- ./bin/test-suffixtree
- ./bin/test-gsa
- ./bin/test-desa
- mpiexec -np 4 ./bin/test-psac
- mpiexec -np 13 ./bin/test-psac
- mpiexec -np 4 ./bin/test-ansv
- mpiexec -np 13 ./bin/test-ansv
- mpiexec -np 4 ./bin/test-suffixtree
- mpiexec -np 13 ./bin/test-gsa
- mpiexec -np 4 ./bin/test-gsa
- mpiexec -np 4 ./bin/test-ss
- mpiexec -np 4 ./bin/test-desa
after_success:
# only collect coverage if compiled with gcc
- if [ "$CXX" = "g++-4.8" ]; then codecov --gcov-exec gcov-4.8; fi