forked from boostorg/compute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
111 lines (105 loc) · 4.63 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
107
108
109
110
111
language: cpp
env:
global:
- OPENCL_REGISTRY=https://www.khronos.org/registry/cl
- OPENCL_ROOT=${TRAVIS_BUILD_DIR}/bin/opencl
- LINUX_DIST=precise
- CMAKE_OPTIONS="-DBOOST_COMPUTE_BUILD_TESTS=ON -DBOOST_COMPUTE_BUILD_EXAMPLES=ON -DBOOST_COMPUTE_BUILD_BENCHMARKS=ON -DBOOST_COMPUTE_USE_OFFLINE_CACHE=ON -DBOOST_COMPUTE_ENABLE_COVERAGE=ON -DBOOST_COMPUTE_HAVE_OPENCV=ON -DBOOST_COMPUTE_THREAD_SAFE=ON"
- CXX_FLAGS="-Wall -pedantic -Werror -Wno-variadic-macros -Wno-long-long -Wno-shadow -Wno-deprecated-declarations"
- ENV_CMAKE_OPTIONS=""
- ENV_CXX_FLAGS=""
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
env:
- LINUX_DIST=trusty
- ENV_CMAKE_OPTIONS="-DOPENCL_LIBRARIES=${OPENCL_ROOT}/lib/libOpenCL.so -DOPENCL_INCLUDE_DIRS=${OPENCL_ROOT}/include"
- os: linux
dist: trusty
sudo: required
compiler: clang
env:
- LINUX_DIST=trusty
- ENV_CMAKE_OPTIONS="-DOPENCL_LIBRARIES=${OPENCL_ROOT}/lib/libOpenCL.so -DOPENCL_INCLUDE_DIRS=${OPENCL_ROOT}/include"
- os: linux
sudo: required
compiler: clang
env:
- ENV_CMAKE_OPTIONS="-DOPENCL_LIBRARIES=${OPENCL_ROOT}/lib/libOpenCL.so -DOPENCL_INCLUDE_DIRS=${OPENCL_ROOT}/include"
- os: linux
sudo: required
compiler: gcc
env:
- ENV_CMAKE_OPTIONS="-DOPENCL_LIBRARIES=${OPENCL_ROOT}/lib/libOpenCL.so -DOPENCL_INCLUDE_DIRS=${OPENCL_ROOT}/include"
- os: osx
compiler: clang
env:
- ENV_CXX_FLAGS="-Wno-c99-extensions"
allow_failures:
- os: osx
before_install:
- if [ ${TRAVIS_OS_NAME} == "linux" ] && [ ${LINUX_DIST} == "trusty" ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo add-apt-repository -y ppa:boost-latest/ppa;
sudo apt-get update -qq -y;
sudo apt-get install -qq libboost-chrono1.55-dev libboost-date-time1.55-dev libboost-test1.55-dev libboost-system1.55-dev libboost-filesystem1.55-dev libboost-timer1.55-dev libboost-program-options1.55-dev libboost-thread1.55-dev python-yaml lcov libopencv-dev g++-4.8;
fi
- if [ ${TRAVIS_OS_NAME} == "linux" ] && [ ${LINUX_DIST} == "precise" ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo apt-get update -qq -y;
sudo apt-get install -qq libboost-chrono1.48-dev libboost-date-time1.48-dev libboost-test1.48-dev libboost-system1.48-dev libboost-filesystem1.48-dev libboost-timer1.48-dev libboost-program-options1.48-dev libboost-thread1.48-dev python-yaml lcov libopencv-dev g++-4.8;
fi
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then
brew update;
brew outdated boost || brew upgrade boost;
brew outdated cmake || brew upgrade cmake;
brew install lcov homebrew/science/opencv;
fi
- gem install coveralls-lcov
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
# combine global build options with os/compiler-dependent options
- export CMAKE_OPTIONS=${CMAKE_OPTIONS}" "${ENV_CMAKE_OPTIONS}
- export CXX_FLAGS=${CXX_FLAGS}" "${ENV_CXX_FLAGS}
install:
# fglrx does not work: https://github.com/travis-ci/travis-ci/issues/5221,
# so we build our own linkable .so file.
# Thanks to clSPARSE for providing opencl-icd build script.
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then
mkdir -p ${OPENCL_ROOT};
pushd ${OPENCL_ROOT};
travis_retry wget --no-check-certificate ${OPENCL_REGISTRY}/specs/opencl-icd-1.2.11.0.tgz;
tar -xf opencl-icd-1.2.11.0.tgz;
mv ./icd/* .;
mkdir -p inc/CL;
pushd inc/CL;
travis_retry wget -r -w 1 -np -nd -nv -A h,hpp --no-check-certificate https://www.khronos.org/registry/cl/api/1.2/;
travis_retry wget -w 1 -np -nd -nv -A h,hpp --no-check-certificate https://www.khronos.org/registry/cl/api/2.1/cl.hpp;
popd;
mkdir -p lib;
pushd lib;
cmake -G "Unix Makefiles" ..;
make;
cp ../bin/libOpenCL.so .;
popd;
mv inc/ include/;
popd;
fi
script:
- mkdir -p build
- cd build
- echo ${CMAKE_OPTIONS}
- echo ${CXX_FLAGS}
- cmake ${CMAKE_OPTIONS} -DCMAKE_CXX_FLAGS=${CXX_FLAGS} ..
- make -j4
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then
./example/list_devices;
ctest --output-on-failure;
ctest --output-on-failure;
fi
after_success:
- lcov --directory test --base-directory ../include/boost/compute/ --capture --output-file coverage.info
- lcov --remove coverage.info '/usr*' -o coverage.info
- cd .. && coveralls-lcov build/coverage.info