-
Notifications
You must be signed in to change notification settings - Fork 44
/
.travis.yml
85 lines (78 loc) · 5.2 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
sudo: required
dist: trusty
language: cpp
addons:
apt:
packages:
- libjpeg-dev
- libpng-dev
- opencl-headers
- libboost-regex-dev
- libatlas-base-dev
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.7" CC="gcc-4.7"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" = "g++-4.7" ]; then sudo apt-get update && sudo apt-get install -y gcc-4.7 g++-4.7; fi; fi
# See clBLAS CI script
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then cd ${TRAVIS_BUILD_DIR}; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then mkdir -p cl12/CL; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then cd cl12/CL; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl.h; fi; fi
# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl.hpp; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_d3d10.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_d3d11.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_dx9_media_sharing.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_egl.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_ext.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_gl.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_gl_ext.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/cl_platform.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then wget https://www.khronos.org/registry/cl/api/1.2/opencl.h; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then ls; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then pwd; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then cd ../..; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then sudo apt-get update && sudo apt-get install -y fglrx; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then git clone https://github.com/clMathLibraries/clBLAS.git; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then cd clBLAS; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then mkdir build; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then cd build; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then cmake -DBUILD_TEST:BOOL=OFF -DOPENCL_INCLUDE_DIRS:PATH=$PWD/../../cl12/ -DCMAKE_INSTALL_PREFIX=/usr -DSUFFIX_LIB= ../src; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then sudo make install; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$TEST_SUITE" = "opencl" ]; then cd ../..; fi; fi
# A little more simple for OS X
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then if [ "$USE_CLBLAS" = "ON" ]; then brew update && brew tap homebrew/science && brew install clblas; fi; fi
before_script:
- mkdir build
- cd build
- if [ "$TEST_SUITE" = "reference" ]; then cmake -DCMAKE_BUILD_TYPE=Release ..; fi
- if [ "$TEST_SUITE" = "opencl" ]; then cmake -DCMAKE_BUILD_TYPE=Release -DCN24_BUILD_OPENCL:BOOL=ON -DCN24_BUILD_OPENCL_CLBLAS:BOOL=$USE_CLBLAS ..; fi
- if [ "$TEST_SUITE" = "accelerate" ]; then cmake -DCMAKE_BUILD_TYPE=Release -DCN24_BUILD_ACCELERATE=ON ..; fi
- if [ "$TEST_SUITE" = "atlas" ]; then cmake -DCMAKE_BUILD_TYPE=Release -DCN24_BUILD_ATLASBLAS=ON ..; fi
script:
- make
# OpenCL on Mac OS X supports a maximum work group size of (1,1,1) on CPUs, so we only do a sanity check in that case
- if [ "$USE_CLBLAS" == "ON" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then ./testOpenCL; else make test;fi
after_failure:
- if [ "$USE_CLBLAS" != "ON" ] || [ "$TRAVIS_OS_NAME" != "osx" ]; then ctest -V --rerun-failed; fi
matrix:
include:
- os: linux
env: TEST_SUITE=reference
compiler: gcc
- os: linux
env: TEST_SUITE=atlas
compiler: gcc
- os: linux
env: TEST_SUITE=reference
compiler: clang
- os: osx
env: TEST_SUITE=reference
compiler: clang
- os: osx
env: TEST_SUITE=accelerate
compiler: clang
- os: osx
env: TEST_SUITE=opencl USE_CLBLAS="ON"
compiler: clang
- os: osx
env: TEST_SUITE=opencl USE_CLBLAS="OFF"
compiler: clang