forked from ECP-copa/Cabana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (76 loc) · 2.76 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
language: cpp
# against hwloc error (travis-ci/travis-ci#10019)
sudo: required
env:
matrix:
- BACKENDS="OpenMP"
- BACKENDS="Serial"
- BACKENDS="Pthread"
- BACKENDS="Serial OpenMP"
- BACKENDS="Serial Pthread"
- BACKENDS="OpenMP" COVERAGE=ON
- BACKENDS="Serial" COVERAGE=ON
- BACKENDS="Pthread" COVERAGE=ON
- BACKENDS="Serial OpenMP" COVERAGE=ON
- BACKENDS="Serial Pthread" COVERAGE=ON
before_script:
- sudo ln -s /usr/bin/ccache /usr/lib/ccache/clang++
- ccache -z
- KOKKOS_OPTS=( --with-hwloc=/usr --gcc-toolchain=/usr )
- for i in ${BACKENDS}; do KOKKOS_OPTS+=( --with-${i,,[A-Z]} ); 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
- git clone --depth=1 https://github.com/kokkos/kokkos.git &&
pushd kokkos &&
mkdir build &&
pushd build &&
../generate_makefile.bash --prefix=$HOME/kokkos ${KOKKOS_OPTS[@]} &&
make -j2 &&
make install &&
popd &&
popd
- for i in ${BACKENDS}; do CMAKE_OPTS+=( -DCabana_ENABLE_${i}=ON ); done
addons:
apt:
packages:
- doxygen
- libhwloc-dev
- openmpi-bin
- libopenmpi-dev
script:
- mkdir build && pushd build &&
cmake -DCMAKE_PREFIX_PATH=$HOME/kokkos
-DCabana_ENABLE_Serial=OFF ${CMAKE_OPTS[@]}
-DCabana_ENABLE_MPI=ON
-DCabana_ENABLE_TESTING=ON -DCabana_ENABLE_EXAMPLES=ON
${COVERAGE:+-DCabana_ENABLE_COVERAGE_BUILD=ON -DCOMPILER_SUPPORTS_MARCH=OFF} .. &&
make -j2 VERBOSE=1 &&
make test CTEST_OUTPUT_ON_FAILURE=1 &&
make doxygen &&
make install DESTDIR=${PWD}/install && rm -rf ${PWD}/install/usr/local && rmdir ${PWD}/install/usr &&
popd
after_success:
- ccache -s
- if [[ ${COVERAGE} ]]; then pushd build && bash <(curl -s https://codecov.io/bash) && popd; fi
- if [[ ${TRAVIS_JOB_NUMBER} = *.1 ]]; then
git fetch origin gh-pages && git checkout -b gh-pages FETCH_HEAD &&
rm -rf doxygen &&
mv build/html doxygen &&
git add --all doxygen;
if [[ ${TRAVIS_BRANCH} = master && ${encrypted_de2ca53a1b69_key} && ${encrypted_de2ca53a1b69_iv} && ${TRAVIS_PULL_REQUEST} == false ]]; then
git config --global user.name "Automatic Deployment (Travis CI)";
git config --global user.email "[email protected]";
git commit -m "Documentation Update";
openssl aes-256-cbc -K $encrypted_de2ca53a1b69_key -iv $encrypted_de2ca53a1b69_iv -in deploy.enc -out ~/.ssh/id_rsa -d;
chmod 600 ~/.ssh/id_rsa;
git push [email protected]:${TRAVIS_REPO_SLUG} gh-pages:gh-pages;
else
git status;
git diff --cached --no-color | head -n 500;
fi;
fi
cache:
- ccache
compiler:
- gcc
- clang