forked from ECP-copa/CabanaMD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
122 lines (111 loc) · 3.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
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
language: cpp
# against hwloc error (travis-ci/travis-ci#10019)
sudo: required
stages:
- canary
- test
jobs:
include:
- stage: canary
env: BACKENDS="OPENMP"
env:
global:
- CCACHE_CPP2=yes
matrix:
- BACKENDS="OPENMP"
- BACKENDS="SERIAL"
- BACKENDS="OPENMP" ArborX=ON
- BACKENDS="SERIAL" ArborX=ON
- BACKENDS="OPENMP" NNP=ON
- BACKENDS="SERIAL" NNP=ON
- BACKENDS="OPENMP" ArborX=ON NNP=ON
- BACKENDS="SERIAL" ArborX=ON NNP=ON
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- ccache
- libhwloc-dev
- libopenmpi-dev
- openmpi-bin
- g++-6
before_script:
- ccache -z
- for i in ${BACKENDS}; do KOKKOS_OPTS+=( -DKokkos_ENABLE_${i}=ON ); done
- for i in ${BACKENDS}; do CABANAMD_OPTS+=( -DCabanaMD_REQUIRE_${i}=ON ); done
# LD_LIBRARY_PATH workaround for libomp: https://github.com/travis-ci/travis-ci/issues/8613
- if [[ ${CC} = clang ]]; then export LD_LIBRARY_PATH=/usr/local/clang/lib:$LD_LIBRARY_PATH; fi
- if [[ ${CC} = gcc ]]; then export CXX=g++-6; export CC=gcc-6; export FC=gfortran-6; fi
- pushd $HOME/build
- git clone --depth=1 https://github.com/kokkos/kokkos.git &&
pushd kokkos && mkdir build && pushd build &&
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos
-DKokkos_ENABLE_SERIAL=OFF
${KOKKOS_OPTS[@]}
-DKokkos_ENABLE_HWLOC=ON -DKokkos_CXX_STANDARD=14
.. &&
make -j2 VERBOSE=1 && make install &&
popd && popd
- if [[ ${ArborX} ]]; then
git clone --depth=1 https://github.com/arborx/ArborX.git &&
pushd ArborX && mkdir build && pushd build &&
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_PREFIX_PATH=${HOME}/kokkos
-DCMAKE_INSTALL_PREFIX=${HOME}/ArborX
.. &&
make -j2 VERBOSE=1 && make install &&
popd && popd;
fi
- git clone --depth=1 https://github.com/ECP-copa/Cabana.git
- pushd Cabana && mkdir build && pushd build &&
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/ArborX"
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana
${CABANA_OPTS[@]}
-DCabana_ENABLE_MPI=ON -DCabana_ENABLE_ARBORX=${ArborX}
-DCabana_ENABLE_TESTING=OFF -DCabana_ENABLE_EXAMPLES=OFF
-DCabana_ENABLE_PERFORMANCE_TESTING=OFF
.. &&
make -k -j2 VERBOSE=1 && make install &&
popd && popd
- if [[ ${NNP} ]]; then
git clone --depth=1 https://github.com/CompPhysVienna/n2p2.git &&
pushd n2p2 && pushd src &&
make libnnp &&
popd && popd;
fi
- if [[ ${COVERAGE} ]]; then
pip install --user coverxygen &&
mkdir -p $HOME/.local/bin && wget -O $HOME/.local/bin/codecov https://codecov.io/bash && chmod +x $HOME/.local/bin/codecov;
fi
- popd
script:
- mkdir build && pushd build &&
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror"
-DCMAKE_PREFIX_PATH="$HOME/Cabana"
-DCabanaMD_ENABLE_TESTING=ON
-DCabanaMD_REQUIRE_SERIAL=OFF
-DCabanaMD_ENABLE_NNP=${NNP}
-DN2P2_DIR=$HOME/build/n2p2
${CABANAMD_OPTS[@]}
.. &&
make -j4 VERBOSE=1 &&
make test CTEST_OUTPUT_ON_FAILURE=1 &&
make format && git diff --exit-code &&
popd
after_success:
- ccache -s
- if [[ ${COVERAGE} ]]; then pwd && pushd build && pwd &&
codecov -x gcov-6; fi
branches:
only:
- master
cache:
directories:
- $HOME/.ccache
compiler:
- gcc
- clang