1# Copyright 2018 Stefan Seefeld
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
4
5
6language: cpp
7
8sudo: required
9
10branches:
11  only:
12    - master
13    - develop
14    - doc
15    - ci
16
17# env: specifies additional global variables to define per row in build matrix
18env:
19  global:
20    - CLBLAS_PREFIX=${TRAVIS_BUILD_DIR}/CLBLAS/
21    - PATH=${CLBLAS_PREFIX}/bin:$PATH
22    - LD_LIBRARY_PATH=${CLBLAS_PREFIX}/lib:$LD_LIBRARY_PATH
23
24matrix:
25  include:
26    - os: linux
27      env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=11
28    - os: linux
29      env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=17
30
31addons:
32  apt:
33    sources:
34    - ubuntu-toolchain-r-test
35    packages:
36    - g++-7
37    - libopenblas-base
38    - rpm2cpio
39    - cpio
40    - clinfo
41    - opencl-headers
42    - ocl-icd-opencl-dev
43
44before_install:
45  - if [ ${TRAVIS_OS_NAME} == "linux" ]; then .ci/install-ocl-ubuntu.sh; fi
46  - .ci/install-clblas.sh
47  - cmake --version;
48  - ${CC} --version;
49  - ${CXX} --version;
50
51install:
52  - cd ..
53  - git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
54  - cd boost-root
55  - git submodule update --init --jobs 8 tools/build
56  - git submodule update --init --jobs 8 libs/config
57  - git submodule update --init --jobs 8 tools/boostdep
58  - mkdir -p libs/numeric/
59  - cp -r $TRAVIS_BUILD_DIR/* libs/numeric/ublas
60  - python tools/boostdep/depinst/depinst.py -I benchmarks numeric/ublas
61  - ./bootstrap.sh
62  - ./b2 -j 8 headers
63
64# Use before_script: to run configure steps
65before_script:
66
67
68# use script: to execute build steps
69script:
70  - |-
71    echo "using $TOOLSET : : $COMPILER ;" >> ~/user-config.jam;
72    echo "using clblas : : <include>${CLBLAS_PREFIX}/include <search>${CLBLAS_PREFIX}/lib ;" >> ~/user-config.jam;
73    cp $TRAVIS_BUILD_DIR/opencl.jam ~/
74    cp $TRAVIS_BUILD_DIR/clblas.jam ~/
75  - ./b2 -j 8 libs/numeric/ublas/test toolset=$TOOLSET cxxstd=$CXXSTD
76  - ./b2 -j 8 libs/numeric/ublas/benchmarks toolset=$TOOLSET cxxstd=$CXXSTD
77  - ./b2 -j 8 libs/numeric/ublas/examples/tensor toolset=$TOOLSET cxxstd=$CXXSTD
78
79notifications:
80  email:
81    on_success: always
82