1111 # Khronos OpenCL ICD
1212 - OPENCL_REGISTRY=https://www.khronos.org/registry/OpenCL/
1313 - OPENCL_ROOT=${DEPS_DIR}/opencl
14+ - OPENCL_ICD_LIB=${OPENCL_ROOT}/icd/build/lib/libOpenCL.so
1415 # POCL
1516 - POCL_BRANCH=release_1_2 # branch/tag
1617 - POCL_LLVM_VERSION=7.0.0
@@ -96,7 +97,7 @@ matrix:
9697 - OPENCL_LIB=pocl
9798 - ENV_CXX_FLAGS="-Wno-unused-local-typedef -DBOOST_COMPUTE_MAX_CL_VERSION=101"
9899 - ENV_CMAKE_OPTIONS="-DOpenCL_LIBRARY=${POCL_OPENCL_LIB} -DOpenCL_INCLUDE_DIR=${OPENCL_ROOT}/include"
99- # Linux , OpenCL 1.2
100+ # Xenial , OpenCL 1.2
100101 # CLANG
101102 - os : linux
102103 compiler : clang
@@ -119,10 +120,10 @@ matrix:
119120 - ENV_CMAKE_OPTIONS="-DOpenCL_LIBRARY=${POCL_OPENCL_LIB} -DOpenCL_INCLUDE_DIR=${OPENCL_ROOT}/include"
120121
121122 # ###########################################################################
122- # Intel OpenCL Runtime builds
123+ # Intel OpenCL Runtime builds (1.2, 2.0, 2.1)
123124 # ###########################################################################
124125
125- # Linux , Intel OpenCL 1.2
126+ # Xenial , Intel OpenCL 1.2
126127 # CLANG
127128 - os : linux
128129 compiler : clang
@@ -143,7 +144,7 @@ matrix:
143144 - OPENCL_LIB=intel
144145 - ENV_CXX_FLAGS="-Wno-unused-local-typedef -DBOOST_COMPUTE_MAX_CL_VERSION=102"
145146 - ENV_CMAKE_OPTIONS="-DOpenCL_INCLUDE_DIR=${OPENCL_ROOT}/include"
146- # Linux , Intel OpenCL 2.0
147+ # Xenial , Intel OpenCL 2.0
147148 # CLANG
148149 - os : linux
149150 compiler : clang
@@ -164,7 +165,7 @@ matrix:
164165 - OPENCL_LIB=intel
165166 - ENV_CXX_FLAGS="-Wno-unused-local-typedef -DBOOST_COMPUTE_MAX_CL_VERSION=200"
166167 - ENV_CMAKE_OPTIONS="-DOpenCL_INCLUDE_DIR=${OPENCL_ROOT}/include"
167- # Linux , Intel OpenCL 2.1
168+ # Xenial , Intel OpenCL 2.1, New Boost Libs, C++11, Coverage
168169 # CLANG
169170 - os : linux
170171 compiler : clang
@@ -202,6 +203,36 @@ matrix:
202203 - ENV_CMAKE_OPTIONS="-DOpenCL_INCLUDE_DIR=${OPENCL_ROOT}/include -DBOOST_COMPUTE_ENABLE_COVERAGE=ON -DBOOST_COMPUTE_USE_CPP11=ON"
203204 - COVERAGE=true
204205
206+ # ###########################################################################
207+ # OpenCL 2.2 Only Build
208+ # ###########################################################################
209+
210+ # Linux, OpenCL 2.2, Tests not run, C++11
211+ # CLANG
212+ - os : linux
213+ dist : xenial
214+ compiler : clang
215+ addons :
216+ apt :
217+ packages : *xenial_packages
218+ env :
219+ - OPENCL_LIB=khronos-icd
220+ - RUN_TESTS=false
221+ - ENV_CXX_FLAGS="-Wno-unused-local-typedef -DBOOST_COMPUTE_MAX_CL_VERSION=202"
222+ - ENV_CMAKE_OPTIONS="-DOpenCL_LIBRARY=${OPENCL_ICD_LIB} -DOpenCL_INCLUDE_DIR=${OPENCL_ROOT}/include -DBOOST_COMPUTE_USE_CPP11=ON"
223+ # GCC
224+ - os : linux
225+ dist : xenial
226+ compiler : gcc
227+ addons :
228+ apt :
229+ packages : *xenial_packages
230+ env :
231+ - OPENCL_LIB=khronos-icd
232+ - RUN_TESTS=false
233+ - ENV_CXX_FLAGS="-Wno-unused-local-typedef -DBOOST_COMPUTE_MAX_CL_VERSION=202"
234+ - ENV_CMAKE_OPTIONS="-DOpenCL_LIBRARY=${OPENCL_ICD_LIB} -DOpenCL_INCLUDE_DIR=${OPENCL_ROOT}/include -DBOOST_COMPUTE_USE_CPP11=ON"
235+
205236 # ###########################################################################
206237 # OSX
207238 # ###########################################################################
@@ -267,7 +298,7 @@ matrix:
267298 # Download clinfo executable and add it to PATH
268299 - mkdir bin
269300 - curl -L 'https://ci.appveyor.com/api/projects/oblomov/clinfo/artifacts/clinfo.exe?job=platform:+x64' -o ./bin/clinfo.exe
270- - export PATH=./bin/:PATH
301+ - export PATH=./bin/:$ PATH
271302
272303cache :
273304 directories :
@@ -289,16 +320,12 @@ before_install:
289320 fi
290321 fi
291322 - gem install coveralls-lcov
292-
293- # Combine global build options with OS/compiler-dependent options
294- - export CMAKE_OPTIONS=${CMAKE_OPTIONS}" "${ENV_CMAKE_OPTIONS}
295- - export CXXFLAGS=${CXX_FLAGS}" "${ENV_CXX_FLAGS}
296323 # Pick correct compiler on OSX
297324 - eval "${MATRIX_EVAL}"
298325
299326install :
300327 # ###########################################################################
301- # Download and install recent CMake
328+ # Download and install recent CMake
302329 # ###########################################################################
303330 - |
304331 if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
@@ -309,7 +336,7 @@ install:
309336 fi
310337
311338 # ###########################################################################
312- # Download and install Boost
339+ # Download and install Boost
313340 # ###########################################################################
314341 - |
315342 if [[ ${TRAVIS_OS_NAME} == "linux" && ${BOOST_VERSION} != "default" ]]; then
@@ -348,6 +375,22 @@ install:
348375 popd
349376 fi
350377
378+ # ###########################################################################
379+ # Only ICD
380+ # ###########################################################################
381+ - |
382+ if [[ ${TRAVIS_OS_NAME} == "linux" && ${OPENCL_LIB} == "khronos-icd" ]]; then
383+ mkdir -p ${OPENCL_ROOT}
384+ pushd ${OPENCL_ROOT}
385+ travis_retry git clone --depth 1 https://github.com/KhronosGroup/OpenCL-ICD-Loader.git icd
386+ pushd icd
387+ mkdir -p inc/CL
388+ cp ${OPENCL_ROOT}/include/CL/* ./inc/CL/
389+ make -j2
390+ popd
391+ popd
392+ fi
393+
351394 # ###########################################################################
352395 # Build and install POCL https://github.com/pocl/pocl
353396 # ###########################################################################
@@ -359,7 +402,7 @@ install:
359402 mkdir build
360403 cd build
361404 cmake -DDIRECT_LINKAGE=ON -DENABLE_ICD=OFF -DCMAKE_C_COMPILER=${POCL_C_COMPILER} -DCMAKE_CXX_COMPILER=${POCL_CXX_COMPILER} -DWITH_LLVM_CONFIG=${POCL_LLVM_CONFIG} -DCMAKE_INSTALL_PREFIX=${POCL_ROOT}/ ..
362- make install
405+ make -j2 install
363406 cd ../..
364407 else
365408 echo 'Using cached POCL lib.'
@@ -385,8 +428,10 @@ script:
385428 # Build Boost.Compute tests, benchmarks and examples
386429 # ###########################################################################
387430 - clinfo
388- - mkdir -p build
389- - cd build
431+ - mkdir build && cd build
432+ # Combine global build options with OS/compiler-dependent options
433+ - export CMAKE_OPTIONS=${CMAKE_OPTIONS}" "${ENV_CMAKE_OPTIONS}
434+ - export CXXFLAGS=${CXX_FLAGS}" "${ENV_CXX_FLAGS}
390435 - echo ${CXXFLAGS}
391436 - echo ${CXX}
392437 - echo ${CCFLAGS}
@@ -397,7 +442,7 @@ script:
397442 # https://stackoverflow.com/questions/39865367/warning-section-textcoal-nt-is-deprecate-since-updating-to-mac-osx-sierra
398443 # Build must be run sequentially or else the grep command will not catch warnings correctly
399444 - if [[ ${TRAVIS_OS_NAME} == "osx" && ${CC} == "gcc-5" ]]; then cmake --build . --config Debug 2>&1 | grep -v -e '^/var/folders/*' -e '^[[:space:]]*\.section' -e '^[[:space:]]*\^[[:space:]]*~*' ; fi
400- - if [[ ${TRAVIS_OS_NAME} != "osx" || ${CC} != "gcc-5" ]]; then cmake --build . -j 4 --config Debug ; fi
445+ - if [[ ${TRAVIS_OS_NAME} != "osx" || ${CC} != "gcc-5" ]]; then cmake --build . -j 2 --config Debug ; fi
401446 - |
402447 if [[ ${RUN_TESTS} == "true" ]]; then
403448 # Print OpenCL devices
0 commit comments