99# Ubuntu 15.10 (Wily Werewolf)
1010# Ubuntu 16.04 LTS (Xenial Xantus)
1111
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-
1912# os: expands the build matrix to include multiple os's
20- # disable linux, as we get sporadic failures on building boost, needs investigation
2113os :
2214 - linux
2315 - osx
2416
17+ # sudo: false instructs travis to build our project in a docker VM (faster),
18+ # but we cannot yet install fglrx packages with 'false'
19+ sudo : required # false
20+ dist : trusty
21+
22+ # language: instructs travis what compilers && environment to set up in build matrix
23+ language : cpp
24+
2525# compiler: expands the build matrix to include multiple compilers (per os)
2626compiler :
2727 - gcc
@@ -35,37 +35,20 @@ addons:
3535 apt :
3636 sources :
3737 # ubuntu-toolchain-r-test contains newer versions of gcc to install
38- - ubuntu-toolchain-r-test
38+ # - ubuntu-toolchain-r-test
39+
3940 # llvm-toolchain-precise-3.6 contains newer versions of clang to install
4041 # - 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
4542 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
5843 # 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
44+ - opencl-headers
6445
6546# env: specifies additional global variables to define per row in build matrix
6647env :
6748 global :
6849 - CLSPARSE_ROOT=${TRAVIS_BUILD_DIR}/bin/make/release
50+ - OPENCL_REGISTRY=https://www.khronos.org/registry/cl
51+ - OPENCL_ROOT=${TRAVIS_BUILD_DIR}/bin/opencl
6952
7053# The following filters our build matrix; we are interested in linux-gcc & osx-clang
7154matrix :
@@ -79,39 +62,52 @@ before_install:
7962 # Remove the following linux clause when fglrx can be installed with sudo: false
8063 - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
8164 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";
65+ sudo apt-get install -qq libboost-all-dev;
66+ export BUILD_BOOST="OFF";
8767 fi
8868 - if [ ${TRAVIS_OS_NAME} == "osx" ]; then
8969 brew update;
9070 brew outdated boost || brew upgrade boost;
9171 brew outdated cmake || brew upgrade cmake;
9272 export BUILD_BOOST="OFF";
9373 fi
94- - if [ ${CXX} = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
74+ # - if [ ${CXX} = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
9575 - cmake --version;
9676 - ${CC} --version;
9777 - ${CXX} --version;
9878
9979install :
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
10880 # osx image does not contain cl.hpp file; download from Khronos
10981 - if [ ${TRAVIS_OS_NAME} == "osx" ]; then
11082 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;
83+ sudo wget -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/2.1/cl.hpp;
84+ popd;
85+ fi
86+ # The following linux logic is necessary because of Travis's move to the GCE platform, which does not
87+ # currently contain packages for fglrx: https://github.com/travis-ci/travis-ci/issues/5221
88+ # We build our own linkable .so file
89+ - if [ ${TRAVIS_OS_NAME} == "linux" ]; then
90+ mkdir -p ${OPENCL_ROOT};
91+ pushd ${OPENCL_ROOT};
92+ wget ${OPENCL_REGISTRY}/specs/opencl-icd-1.2.11.0.tgz;
93+ tar -xf opencl-icd-1.2.11.0.tgz;
94+ mv ./icd/* .;
95+ mkdir -p inc/CL;
96+ pushd inc/CL;
97+ wget -r -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/1.2/;
98+ wget -w 1 -np -nd -nv -A h,hpp https://www.khronos.org/registry/cl/api/2.1/cl.hpp;
99+ popd;
100+ mkdir -p lib;
101+ pushd lib;
102+ cmake -G "Unix Makefiles" ..;
103+ make;
104+ cp ../bin/libOpenCL.so .;
105+ popd;
106+ mv inc/ include/;
112107 popd;
113108 fi
114109
110+
115111# Use before_script: to run configure steps
116112before_script :
117113 - mkdir -p ${CLSPARSE_ROOT}
@@ -123,6 +119,7 @@ script:
123119 - make clSPARSE-samples
124120 - cd clSPARSE-build
125121 - make package
122+ - popd
126123
127124deploy :
128125 provider : releases
@@ -132,8 +129,8 @@ deploy:
132129 # This uses a personal OAuth token generated by kknox
133130 api_key :
134131 secure : MBkxtcfSk+4UvGRO+WRhmS86vIVzAs0LIF2sAtr/S+Ed+OdUAuhZypUsDXGWtK3mL55v9c8BZXefFfHfJqElcNmyHKwCptbCR/JiM8YBtjoy2/RW1NcJUZp+QuRlk23xPADj7QkPjv7dfrQUMitkLUXAD+uTmMe2l8gmlbhMrQqPBKhb+31FNv6Lmo6oa6GjbiGi7qjsrJc7uQjhppLam+M7BZbBALGbIqMIrb2BMDMMhBoDbb4zSKrSg3+krd3kKiCClJlK7xjIlyFXZ527ETQ+PMtIeQb0eJ3aQwa4caBRCm5BDzt8GnJ48S88EkynbQioCEE87ebcyOM7M+wfslW/Fm1Y86X5odIljkOmTNKoDvgLxc9vUCBtMyVHNIgZcToPdsrMsGxcHV+JtU3yVQVm6dnA5P/zG5bA+aBjsd7p7BdOE4fdhvZV5XRAk/wmiyWalF7hKJxHIiWAKknL+tpPDDUF+fHmDDsdf7yRDJBegNcKfw4+m19MIvLn9fbiNVCtwCAL1T4yWkIEpi4MRMDPtftmkZPbi6UwluOJUTeCeHe4en99Yu2haemNPqXs6rR0LlXGk31GQwzlrNfb+94F5tT2a4Ka4PsruA2NMW/IYCYEE5Gu7PihVDR031Fn9cdCU9kefUgyB07rJD6q/W+ljsU0osyg7VxyfMg8rkw=
135- file : ${CLSPARSE_ROOT}/clSPARSE-build/*.tar.gz
136132 file_glob : true
133+ file : ${CLSPARSE_ROOT}/clSPARSE-build/*.tar.gz
137134 on :
138135 all_branches : true
139136 tags : true
0 commit comments