|
| 1 | +# Ubuntu name decoder ring; https://en.wikipedia.org/wiki/List_of_Ubuntu_releases |
| 2 | +# Ubuntu 12.04 LTS (Precise Pangolin) <== Travis CI VM image |
| 3 | +# Ubuntu 12.10 (Quantal Quetzal) |
| 4 | +# Ubuntu 13.04 (Raring Ringtail) |
| 5 | +# Ubuntu 13.10 (Saucy Salamander) |
| 6 | +# Ubuntu 14.04 LTS (Trusty Tahr) |
| 7 | +# Ubuntu 14.10 (Utopic Unicorn) |
| 8 | +# Ubuntu 15.04 (Vivid Vervet) |
| 9 | +# Ubuntu 15.10 (Wily Werewolf) |
| 10 | +# Ubuntu 16.04 LTS (Xenial Xantus) |
| 11 | + |
| 12 | +# language: instructs travis what compilers && environment to set up in build matrix |
| 13 | +language: cpp |
| 14 | + |
| 15 | +# sudo: false instructs travis to build our project in a docker VM (faster) |
| 16 | +# Can not yet install fglrx packages with 'false' |
| 17 | +sudo: required # false |
| 18 | + |
| 19 | +# os: expands the build matrix to include multiple os's |
| 20 | +# disable linux, as we get sporadic failures on building boost, needs investigation |
| 21 | +os: |
| 22 | +# - linux |
| 23 | + - osx |
| 24 | + |
| 25 | +# compiler: expands the build matrix to include multiple compilers (per os) |
| 26 | +compiler: |
| 27 | + - gcc |
| 28 | + - clang |
| 29 | + |
| 30 | +addons: |
| 31 | + # apt: is disabled on osx builds |
| 32 | + # apt: needed by docker framework to install project dependencies without |
| 33 | + # sudo. Apt uses published Ubunto PPA's from https://launchpad.net/ |
| 34 | + # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json |
| 35 | + apt: |
| 36 | + sources: |
| 37 | + # ubuntu-toolchain-r-test contains newer versions of gcc to install |
| 38 | + - ubuntu-toolchain-r-test |
| 39 | + # llvm-toolchain-precise-3.6 contains newer versions of clang to install |
| 40 | + # - llvm-toolchain-precise-3.6 |
| 41 | + # kubuntu-backports contains newer versions of cmake to install |
| 42 | + - kubuntu-backports |
| 43 | + # boost-latest contains boost v1.55 |
| 44 | + # - boost-latest |
| 45 | + packages: |
| 46 | + # g++-4.8 is minimum version considered to be the first good c++11 gnu compiler |
| 47 | + - g++-4.8 |
| 48 | + # - clang-3.6 |
| 49 | + # We require v2.8.12 minimum |
| 50 | + - cmake |
| 51 | + # I'm finding problems between pre-compiled versions of boost ublas, with gtest |
| 52 | + # stl_algobase.h: error: no matching function for call to swap() |
| 53 | + # - libboost-program-options1.55-dev |
| 54 | + # - libboost-serialization1.55-dev |
| 55 | + # - libboost-filesystem1.55-dev |
| 56 | + # - libboost-system1.55-dev |
| 57 | + # - libboost-regex1.55-dev |
| 58 | + # The package opencl-headers on 'precise' only installs v1.1 cl headers; uncomment for 'trusty' or greater |
| 59 | +# - opencl-headers |
| 60 | + # Uncomment one of the following when fglrx modules are added to the apt whitelist |
| 61 | +# - fglrx |
| 62 | +# - fglrx=2:8.960-0ubuntu1 |
| 63 | +# - fglrx=2:13.350.1-0ubuntu0.0.1 |
| 64 | + |
| 65 | +# env: specifies additional global variables to define per row in build matrix |
| 66 | +env: |
| 67 | + global: |
| 68 | + - CLSPARSE_ROOT=${TRAVIS_BUILD_DIR}/bin/make/release |
| 69 | + |
| 70 | +# The following filters our build matrix; we are interested in linux-gcc & osx-clang |
| 71 | +matrix: |
| 72 | + exclude: |
| 73 | + - os: linux |
| 74 | + compiler: clang |
| 75 | + - os: osx |
| 76 | + compiler: gcc |
| 77 | + |
| 78 | +before_install: |
| 79 | + # Remove the following linux clause when fglrx can be installed with sudo: false |
| 80 | + - if [ ${TRAVIS_OS_NAME} == "linux" ]; then |
| 81 | + sudo apt-get update -qq && |
| 82 | + sudo apt-get install -qq fglrx=2:13.350.1-0ubuntu0.0.1; |
| 83 | + fi |
| 84 | + - if [ ${TRAVIS_OS_NAME} == "linux" ]; then |
| 85 | + export OPENCL_ROOT="${TRAVIS_BUILD_DIR}/opencl-headers"; |
| 86 | + export BUILD_BOOST="ON"; |
| 87 | + fi |
| 88 | + - if [ ${TRAVIS_OS_NAME} == "osx" ]; then |
| 89 | + brew update; |
| 90 | + brew outdated boost || brew upgrade boost; |
| 91 | + brew outdated cmake || brew upgrade cmake; |
| 92 | + export BUILD_BOOST="OFF"; |
| 93 | + fi |
| 94 | + - if [ ${CXX} = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi |
| 95 | + - cmake --version; |
| 96 | + - ${CC} --version; |
| 97 | + - ${CXX} --version; |
| 98 | + |
| 99 | +install: |
| 100 | + # 'Precise' only distributes v1.1 opencl headers; download 1.2 headers from khronos website |
| 101 | + # Remove when the travis VM upgrades to 'trusty' or beyond |
| 102 | + - if [ ${TRAVIS_OS_NAME} == "linux" ]; then |
| 103 | + mkdir -p ${OPENCL_ROOT}/include/CL; |
| 104 | + pushd ${OPENCL_ROOT}/include/CL; |
| 105 | + wget -w 1 -r -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/; |
| 106 | + popd; |
| 107 | + fi |
| 108 | + # osx image does not contain cl.hpp file; download from Khronos |
| 109 | + - if [ ${TRAVIS_OS_NAME} == "osx" ]; then |
| 110 | + pushd /System/Library/Frameworks/OpenCL.framework/Versions/A/Headers/; |
| 111 | + sudo wget -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/cl.hpp; |
| 112 | + popd; |
| 113 | + fi |
| 114 | + |
| 115 | +# Use before_script: to run configure steps |
| 116 | +before_script: |
| 117 | + - mkdir -p ${CLSPARSE_ROOT} |
| 118 | + - pushd ${CLSPARSE_ROOT} |
| 119 | + - cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_Boost=${BUILD_BOOST} -DBUILD_gMock=ON -DBUILD_clSPARSE=ON -DBUILD_SAMPLES=ON ${TRAVIS_BUILD_DIR} |
| 120 | + |
| 121 | +# use script: to execute build steps |
| 122 | +script: |
| 123 | + - make |
| 124 | + - cd clSPARSE-build |
| 125 | + - make package |
0 commit comments