diff --git a/.drone.star b/.drone.star new file mode 100644 index 000000000..659929d6b --- /dev/null +++ b/.drone.star @@ -0,0 +1,25 @@ +# Use, modification, and distribution are +# subject to the Boost Software License, Version 1.0. (See accompanying +# file LICENSE.txt) +# +# Copyright Rene Rivera 2020. + +# For Drone CI we use the Starlark scripting language to reduce duplication. +# As the yaml syntax for Drone CI is rather limited. +# +# +globalenv={} +linuxglobalimage="cppalliance/droneubuntu1804:1" +windowsglobalimage="cppalliance/dronevs2019" + +def main(ctx): + return [ + linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=11 Job 0", "g++-7", packages="g++-7 g++-9 clang-7 clang-10 libopenblas-base rpm2cpio cpio clinfo opencl-headers ocl-icd-opencl-dev", llvm_os="bionic", llvm_ver="10", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '11', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv), + linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=17 Job 1", "g++-7", packages="g++-7 g++-9 clang-7 clang-10 libopenblas-base rpm2cpio cpio clinfo opencl-headers ocl-icd-opencl-dev", llvm_os="bionic", llvm_ver="10", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '17', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv), + linux_cxx("TOOLSET=gcc COMPILER=g++-9 CXXSTD=2a Job 2", "g++-9", packages="g++-7 g++-9 clang-7 clang-10 libopenblas-base rpm2cpio cpio clinfo opencl-headers ocl-icd-opencl-dev", llvm_os="bionic", llvm_ver="10", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': '2a', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv), + linux_cxx("TOOLSET=clang COMPILER=clang++-7 CXXSTD=17 Job 3", "clang++-7", packages="g++-7 g++-9 clang-7 clang-10 libopenblas-base rpm2cpio cpio clinfo opencl-headers ocl-icd-opencl-dev", llvm_os="bionic", llvm_ver="10", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '17', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv), + linux_cxx("TOOLSET=clang COMPILER=clang++-10 CXXSTD=2a Job 4", "clang++-10", packages="g++-7 g++-9 clang-7 clang-10 libopenblas-base rpm2cpio cpio clinfo opencl-headers ocl-icd-opencl-dev", llvm_os="bionic", llvm_ver="10", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': '2a', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv), + ] + +# from https://github.com/boostorg/boost-ci +load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx") diff --git a/.drone/before-install.sh b/.drone/before-install.sh new file mode 100755 index 000000000..74737cc80 --- /dev/null +++ b/.drone/before-install.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2020 Rene Rivera, Sam Darwin +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt) + +if [ "$DRONE_JOB_UUID" = "b6589fc6ab" ] || [ "$DRONE_JOB_UUID" = "356a192b79" ] || [ "$DRONE_JOB_UUID" = "da4b9237ba" ] || [ "$DRONE_JOB_UUID" = "77de68daec" ] || [ "$DRONE_JOB_UUID" = "1b64538924" ] ; then + export CLBLAS_PREFIX="${TRAVIS_BUILD_DIR}/CLBLAS/" + export PATH="${CLBLAS_PREFIX}/bin:$PATH" + export LD_LIBRARY_PATH="${CLBLAS_PREFIX}/lib:$LD_LIBRARY_PATH" + if [ ${TRAVIS_OS_NAME} == "linux" ]; then .ci/install-ocl-ubuntu.sh; fi + .ci/install-clblas.sh + cmake --version; + true ${CC} --version; + ${CXX} --version; +fi + diff --git a/.drone/drone.sh b/.drone/drone.sh new file mode 100755 index 000000000..ddc43b0f4 --- /dev/null +++ b/.drone/drone.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Copyright 2020 Rene Rivera, Sam Darwin +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt) + +set -e +export TRAVIS_BUILD_DIR=$(pwd) +export DRONE_BUILD_DIR=$(pwd) +export TRAVIS_BRANCH=$DRONE_BRANCH +export VCS_COMMIT_ID=$DRONE_COMMIT +export GIT_COMMIT=$DRONE_COMMIT +export REPO_NAME=$DRONE_REPO +export PATH=~/.local/bin:/usr/local/bin:$PATH + +if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then + +echo '==================================> BEFORE_INSTALL' + +. .drone/before-install.sh + +echo '==================================> INSTALL' + +cd .. +git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root +cd boost-root +git submodule update --init --jobs 8 tools/build +git submodule update --init --jobs 8 libs/config +git submodule update --init --jobs 8 tools/boostdep +mkdir -p libs/numeric/ +cp -rp $TRAVIS_BUILD_DIR/. libs/numeric/ublas +python tools/boostdep/depinst/depinst.py -I benchmarks numeric/ublas +./bootstrap.sh +./b2 -j 8 headers +export BOOST_ROOT="`pwd`" + +echo '==================================> SCRIPT' + +echo "using $TOOLSET : : $COMPILER ;" >> ~/user-config.jam; +echo "using clblas : : ${CLBLAS_PREFIX}/include ${CLBLAS_PREFIX}/lib ;" >> ~/user-config.jam; +cp $TRAVIS_BUILD_DIR/opencl.jam ~/ +cp $TRAVIS_BUILD_DIR/clblas.jam ~/ +cd libs/numeric/ublas +$BOOST_ROOT/b2 -j 8 test toolset=$TOOLSET cxxstd=$CXXSTD + +fi