@@ -67,6 +67,8 @@ addons:
6767env :
6868 global :
6969 - 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
7072
7173# The following filters our build matrix; we are interested in linux-gcc & osx-clang
7274matrix :
@@ -80,11 +82,11 @@ before_install:
8082 # Remove the following linux clause when fglrx can be installed with sudo: false
8183 - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
8284 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;
8786 fi
87+ # - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
88+ # export OPENCL_ROOT="${TRAVIS_BUILD_DIR}/opencl-headers";
89+ # fi
8890 - if [ ${TRAVIS_OS_NAME} == "osx" ]; then
8991 brew update;
9092 brew outdated boost || brew upgrade boost;
@@ -98,10 +100,33 @@ before_install:
98100install :
99101 # 'Precise' only distributes v1.1 opencl headers; download 1.2 headers from khronos website
100102 # 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
101112 - 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/;
105130 popd;
106131 fi
107132 # osx image does not contain cl.hpp file; download from Khronos
0 commit comments