This repository has been archived by the owner on Dec 17, 2020. It is now read-only.
forked from kokkos/kokkos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (49 loc) · 1.51 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
sudo: false
language: cpp
os:
- linux
- osx
compiler:
- gcc
- clang
cache:
- ccache
env:
- THREADING="serial"
- THREADING="openmp"
- THREADING="pthread"
# Apple GCC does not support OpenMP. GCC with OpenMP requires Homebrew.
# Apple Clang does not support OpenMP. Clang with OpenMP requires Homebrew.
matrix:
exclude:
- os: osx
env: THREADING="openmp"
- os: osx
compiler: gcc
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
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;
GENERATE_OPTS="--gcc-toolchain=/usr";
fi
- mkdir build
- cd build
- ../generate_makefile.bash --compiler=$CXX --with-$THREADING --with-options=compiler_warnings --cxxflags="-O3 -Werror" ${GENERATE_OPTS}
- make
- make test
after_success:
- ccache -s