forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
106 lines (94 loc) · 2.94 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
sudo: false
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
cache:
- ccache
stages:
- canary
- test
jobs:
include:
- stage: canary
env: CMAKE_BUILD_TYPE=Release BACKEND="OPENMP" CXXFLAGS="-Werror"
os: linux
branches:
only:
- master
- develop
- /^release/
env:
-
- BACKEND="OPENMP"
# - BACKEND="PTHREAD"
- CMAKE_BUILD_TYPE=Debug COVERAGE=yes GTEST_FILTER="-*DeathTest*"
- CMAKE_BUILD_TYPE=Debug BACKEND="OPENMP" COVERAGE=yes GTEST_FILTER="-*DeathTest*"
# - CMAKE_BUILD_TYPE=Debug BACKEND="PTHREAD" COVERAGE=yes
- CMAKE_BUILD_TYPE=Release
- CMAKE_BUILD_TYPE=Release BACKEND="OPENMP"
# - CMAKE_BUILD_TYPE=Release BACKEND="PTHREAD"
matrix:
exclude:
# Apple GCC is just an alias to AppleClang
- os: osx
compiler: gcc
# Apple Clang doesn't support OpenMP
- os: osx
compiler: clang
env: BACKEND="OPENMP"
- os: osx
compiler: clang
env: CMAKE_BUILD_TYPE=Debug BACKEND="OPENMP" COVERAGE=yes GTEST_FILTER="-*DeathTest*"
- os: osx
compiler: clang
env: CMAKE_BUILD_TYPE=Release BACKEND="OPENMP"
# We do this as canary
- os: linux
compiler: gcc
env: CMAKE_BUILD_TYPE=Release BACKEND="OPENMP"
before_script:
- if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
brew update;
export HOMEBREW_NO_AUTO_UPDATE=1;
brew ls --versions ccache > /dev/null || brew install ccache;
export PATH=/usr/local/opt/ccache/libexec:$PATH;
fi
- ccache -z
- if [[ ${COVERAGE} ]]; then export CXX="${CXX} --coverage"; fi
- if [[ ! ${CMAKE_BUILD_TYPE} ]]; then export CXXFLAGS="${CXXFLAGS} -O2"; fi
script:
- export OMP_NUM_THREADS=2
- export OMP_PLACES=threads
- export OMP_PROC_BIND=spread
# LD_LIBRARY_PATH workaround to find clang's 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:+:}$LD_LIBRARY_PATH; fi
# enable ccache for clang on linux and add CCACHE_CPP2 to avoid 'Argument unused during compilation -I...' warning
- if [[ ${TRAVIS_OS_NAME} = linux && ${CC} = clang ]]; then
ln -s /usr/bin/ccache $HOME/bin/clang++;
export CCACHE_CPP2=yes;
fi
- mkdir build &&
pushd build &&
cmake ..
${BACKEND:+-DKokkos_ENABLE_${BACKEND}=On}
-DKokkos_ENABLE_TESTS=On
${CMAKE_BUILD_TYPE:+-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}} &&
make VERBOSE=1 -j2 &&
travis_wait 60 make test CTEST_OUTPUT_ON_FAILURE=1 &&
make install DESTDIR=${PWD}/install && rm -rf ${PWD}/install/usr/local && rmdir ${PWD}/install/usr &&
popd
after_success:
- ccache -s
- if [[ ${COVERAGE} ]]; then
mkdir -p $HOME/.local/bin && wget -O $HOME/.local/bin/codecov https://codecov.io/bash && chmod +x $HOME/.local/bin/codecov;
pushd build &&
if [[ ${CC} = clang* ]]; then
codecov -x "llvm-cov gcov" -F "${CC}";
else
codecov -x gcov -F "${CC}";
fi;
fi