@@ -67,6 +67,8 @@ addons:
67
67
env :
68
68
global :
69
69
- CLBLAS_ROOT=${TRAVIS_BUILD_DIR}/bin/make/release
70
+ - OPENCL_REGISTRY=https://www.khronos.org/registry/cl
71
+ - OPENCL_ROOT=${TRAVIS_BUILD_DIR}/bin/opencl
70
72
71
73
# The following filters our build matrix; we are interested in linux-gcc & osx-clang
72
74
matrix :
@@ -80,11 +82,11 @@ before_install:
80
82
# Remove the following linux clause when fglrx can be installed with sudo: false
81
83
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then
82
84
sudo apt-get update -qq &&
83
- sudo apt-get install -qq fglrx=2:13.350.1-0ubuntu0.0.1;
84
- fi
85
- - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
86
- export OPENCL_ROOT="${TRAVIS_BUILD_DIR}/opencl-headers";
85
+ sudo apt-get install -qq;
87
86
fi
87
+ # - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
88
+ # export OPENCL_ROOT="${TRAVIS_BUILD_DIR}/opencl-headers";
89
+ # fi
88
90
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then
89
91
brew update;
90
92
brew outdated boost || brew upgrade boost;
@@ -98,10 +100,33 @@ before_install:
98
100
install :
99
101
# 'Precise' only distributes v1.1 opencl headers; download 1.2 headers from khronos website
100
102
# Remove when the travis VM upgrades to 'trusty' or beyond
103
+ # - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
104
+ # mkdir -p ${OPENCL_ROOT}/include/CL;
105
+ # pushd ${OPENCL_ROOT}/include/CL;
106
+ # wget -w 1 -r -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/;
107
+ # popd;
108
+ # fi
109
+ # The following linux logic is necessary because of Travis's move to the GCE platform, which does not
110
+ # currently contain packages for fglrx: https://github.com/travis-ci/travis-ci/issues/5221
111
+ # We build our own linkable .so file
101
112
- if [ ${TRAVIS_OS_NAME} == "linux" ]; then
102
- mkdir -p ${OPENCL_ROOT}/include/CL;
103
- pushd ${OPENCL_ROOT}/include/CL;
104
- wget -w 1 -r -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/;
113
+ mkdir -p ${OPENCL_ROOT};
114
+ pushd ${OPENCL_ROOT};
115
+ wget ${OPENCL_REGISTRY}/specs/opencl-icd-1.2.11.0.tgz;
116
+ tar -xf opencl-icd-1.2.11.0.tgz;
117
+ mv ./icd/* .;
118
+ mkdir -p inc/CL;
119
+ pushd inc/CL;
120
+ wget -r -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/;
121
+ wget -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/2.1/cl.hpp;
122
+ popd;
123
+ mkdir -p lib;
124
+ pushd lib;
125
+ cmake -G "Unix Makefiles" ..;
126
+ make;
127
+ cp ../bin/libOpenCL.so .;
128
+ popd;
129
+ mv inc/ include/;
105
130
popd;
106
131
fi
107
132
# osx image does not contain cl.hpp file; download from Khronos
0 commit comments