-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
62 lines (56 loc) · 2.81 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
language: cpp
compiler:
- gcc
- clang
env:
- VALGRIND=ON DYND_CUDA=OFF DYND_FFTW=OFF
- DYND_CUDA=ON DYND_FFTW=OFF
- DYND_CUDA=OFF DYND_FFTW=ON
- ASAN=ON DYND_CUDA=OFF DYND_FFTW=ON
- PYTHON=ON DYND_CUDA=OFF DYND_FFTW=ON DYND_BUILD_TESTS=OFF
# - MSAN=ON DYND_CUDA=OFF DYND_FFTW=ON
matrix:
exclude:
- compiler: gcc
env: ASAN=ON DYND_CUDA=OFF DYND_FFTW=ON
- compiler: gcc
env: MSAN=ON DYND_CUDA=OFF DYND_FFTW=ON
- compiler: gcc
env: PYTHON=ON DYND_CUDA=OFF DYND_FFTW=ON DYND_BUILD_TESTS=OFF
- compiler: clang
env: DYND_CUDA=ON DYND_FFTW=OFF
before_script:
# For newer cmake
- sudo add-apt-repository -y ppa:kalakris/cmake
# For gcc 4.7
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo apt-get install cmake
- if [ "$CC" = "gcc" ]; then sudo apt-get -qq install gcc-4.7; sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 90; export CC="gcc-4.7"; fi
- if [ "$CXX" = "g++" ]; then sudo apt-get -qq install g++-4.7; sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 90; export CXX="g++-4.7"; fi
- if [ "$VALGRIND" == "ON" ]; then sudo apt-get -qq install valgrind; fi
- if [ "$DYND_CUDA" == "ON" ]; then wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.5-14_amd64.deb;
sudo dpkg -i cuda-repo-ubuntu1204_6.5-14_amd64.deb; sudo apt-get update; sudo apt-get -qq install cuda; fi
- if [ "$DYND_FFTW" == "ON" ]; then sudo apt-get -qq install libfftw3-dev; fi
- if [ "$PYTHON" == "ON" ]; then sudo pip install numpy cython; fi
- if [ "$ASAN" == "ON" ]; then export CXXFLAGS='-fsanitize=address -fno-omit-frame-pointer'; fi
- if [ "$MSAN" == "ON" ]; then export CXXFLAGS='-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer'; fi
- if [ "$DYND_BUILD_TESTS" == "" ]; then export DYND_BUILD_TESTS=ON; fi
- mkdir build
- cd build
- cmake -DDYND_CUDA=${DYND_CUDA} -DDYND_FFTW=${DYND_FFTW} -DDYND_BUILD_TESTS=${DYND_BUILD_TESTS} ..
script:
- make || exit 1
- if [ "$DYND_CUDA" == "ON" ]; then exit; fi
- if [ "$DYND_BUILD_TESTS" == "ON"]; then ./tests/test_libdynd; fi
- if [ "$VALGRIND" == "ON" ]; then valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --error-exitcode=123 ./tests/test_libdynd; fi
- if [ "$PYTHON" == "ON" ]; then sudo make install; sudo ldconfig; fi
- if [ "$PYTHON" == "ON" ]; then git clone https://github.com/libdynd/dynd-python.git; fi
- if [ "$PYTHON" == "ON" ]; then cd dynd-python && mkdir build && cd build && cmake .. && make; fi
- if [ "$PYTHON" == "ON" ]; then sudo make install; fi
- if [ "$PYTHON" == "ON" ]; then python -c 'import dynd;dynd.test(exit=True)'; fi
notifications:
email: false
flowdock: b08b3ba4fb86fa48121e90b5f67ccb75
on_success: "change"
on_failure: "always"