Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Travis CI config #554

Merged
merged 2 commits into from
Feb 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 101 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,110 @@
language: cpp
compiler:
- gcc
- clang
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:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install -qq fglrx=2:8.960-0ubuntu1 opencl-headers 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
- 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
- cmake -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 -DCMAKE_CXX_FLAGS="-Wall -pedantic -Werror -Wno-variadic-macros -Wno-long-long -Wno-shadow" ..
- make -j4
- ./example/list_devices
- ctest --output-on-failure
- ctest --output-on-failure
- 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
Expand Down
2 changes: 2 additions & 0 deletions perf/perf_fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//

#include <iostream>

#include <boost/compute/system.hpp>
#include <boost/compute/algorithm/fill.hpp>
#include <boost/compute/container/vector.hpp>
Expand Down