@@ -15,6 +15,7 @@ language: cpp
15
15
# sudo: false instructs travis to build our project in a docker VM (faster)
16
16
# Can not yet install fglrx packages with 'false'
17
17
sudo : required # false
18
+ dist : trusty
18
19
19
20
# os: expands the build matrix to include multiple os's
20
21
# disable linux, as we get sporadic failures on building boost, needs investigation
@@ -67,6 +68,8 @@ addons:
67
68
env :
68
69
global :
69
70
- CLBLAS_ROOT=${TRAVIS_BUILD_DIR}/bin/make/release
71
+ - OPENCL_REGISTRY=https://www.khronos.org/registry/cl
72
+ - OPENCL_ROOT=${TRAVIS_BUILD_DIR}/bin/opencl
70
73
71
74
# The following filters our build matrix; we are interested in linux-gcc & osx-clang
72
75
matrix :
@@ -78,13 +81,13 @@ matrix:
78
81
79
82
before_install :
80
83
# Remove the following linux clause when fglrx can be installed with sudo: false
81
- - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
82
- 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";
87
- fi
84
+ # - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
85
+ # sudo apt-get update -qq &&
86
+ # sudo apt-get install -qq fglrx=2:13.350.1-0ubuntu0.0.1;
87
+ # fi
88
+ # - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
89
+ # export OPENCL_ROOT="${TRAVIS_BUILD_DIR}/opencl-headers";
90
+ # fi
88
91
- if [ ${TRAVIS_OS_NAME} == "osx" ]; then
89
92
brew update;
90
93
brew outdated boost || brew upgrade boost;
@@ -98,10 +101,33 @@ before_install:
98
101
install :
99
102
# 'Precise' only distributes v1.1 opencl headers; download 1.2 headers from khronos website
100
103
# Remove when the travis VM upgrades to 'trusty' or beyond
104
+ # - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
105
+ # mkdir -p ${OPENCL_ROOT}/include/CL;
106
+ # pushd ${OPENCL_ROOT}/include/CL;
107
+ # wget -w 1 -r -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/;
108
+ # popd;
109
+ # fi
110
+ # The following linux logic is necessary because of Travis's move to the GCE platform, which does not
111
+ # currently contain packages for fglrx: https://github.com/travis-ci/travis-ci/issues/5221
112
+ # We build our own linkable .so file
101
113
- 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/;
114
+ mkdir -p ${OPENCL_ROOT};
115
+ pushd ${OPENCL_ROOT};
116
+ wget ${OPENCL_REGISTRY}/specs/opencl-icd-1.2.11.0.tgz;
117
+ tar -xf opencl-icd-1.2.11.0.tgz;
118
+ mv ./icd/* .;
119
+ mkdir -p inc/CL;
120
+ pushd inc/CL;
121
+ wget -r -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/;
122
+ wget -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/2.1/cl.hpp;
123
+ popd;
124
+ mkdir -p lib;
125
+ pushd lib;
126
+ cmake -G "Unix Makefiles" ..;
127
+ make;
128
+ cp ../bin/libOpenCL.so .;
129
+ popd;
130
+ mv inc/ include/;
105
131
popd;
106
132
fi
107
133
# osx image does not contain cl.hpp file; download from Khronos
@@ -115,7 +141,7 @@ install:
115
141
before_script :
116
142
- mkdir -p ${CLBLAS_ROOT}
117
143
- pushd ${CLBLAS_ROOT}
118
- - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TEST=OFF -DBUILD_CLIENT=ON -DOCL_VERSION=2.0 -DOPENCL_ROOT=${OPENCL_ROOT} ${TRAVIS_BUILD_DIR}/src
144
+ - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TEST=OFF -DBUILD_CLIENT=OFF -DOCL_VERSION=2.0 -DOPENCL_ROOT=${OPENCL_ROOT} ${TRAVIS_BUILD_DIR}/src
119
145
120
146
# use script: to execute build steps
121
147
script :
0 commit comments