Skip to content

Commit aa55bc2

Browse files
committed
add drone config [ci skip]
1 parent a81712c commit aa55bc2

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed

.drone.star

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use, modification, and distribution are
2+
# subject to the Boost Software License, Version 1.0. (See accompanying
3+
# file LICENSE.txt)
4+
#
5+
# Copyright Rene Rivera 2020.
6+
7+
# For Drone CI we use the Starlark scripting language to reduce duplication.
8+
# As the yaml syntax for Drone CI is rather limited.
9+
#
10+
#
11+
globalenv={}
12+
linuxglobalimage="cppalliance/droneubuntu1804:1"
13+
windowsglobalimage="cppalliance/dronevs2019"
14+
15+
def main(ctx):
16+
return [
17+
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),
18+
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),
19+
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),
20+
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),
21+
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),
22+
]
23+
24+
# from https://github.com/boostorg/boost-ci
25+
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")

.drone/before-install.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Copyright 2020 Rene Rivera, Sam Darwin
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
6+
7+
if [ "$DRONE_JOB_UUID" = "b6589fc6ab" ] || [ "$DRONE_JOB_UUID" = "356a192b79" ] || [ "$DRONE_JOB_UUID" = "da4b9237ba" ] || [ "$DRONE_JOB_UUID" = "77de68daec" ] || [ "$DRONE_JOB_UUID" = "1b64538924" ] ; then
8+
export CLBLAS_PREFIX="${TRAVIS_BUILD_DIR}/CLBLAS/"
9+
export PATH="${CLBLAS_PREFIX}/bin:$PATH"
10+
export LD_LIBRARY_PATH="${CLBLAS_PREFIX}/lib:$LD_LIBRARY_PATH"
11+
if [ ${TRAVIS_OS_NAME} == "linux" ]; then .ci/install-ocl-ubuntu.sh; fi
12+
.ci/install-clblas.sh
13+
cmake --version;
14+
true ${CC} --version;
15+
${CXX} --version;
16+
fi
17+

.drone/drone.sh

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
# Copyright 2020 Rene Rivera, Sam Darwin
4+
# Distributed under the Boost Software License, Version 1.0.
5+
# (See accompanying file LICENSE.txt or copy at http://boost.org/LICENSE_1_0.txt)
6+
7+
set -e
8+
export TRAVIS_BUILD_DIR=$(pwd)
9+
export DRONE_BUILD_DIR=$(pwd)
10+
export TRAVIS_BRANCH=$DRONE_BRANCH
11+
export VCS_COMMIT_ID=$DRONE_COMMIT
12+
export GIT_COMMIT=$DRONE_COMMIT
13+
export REPO_NAME=$DRONE_REPO
14+
export PATH=~/.local/bin:/usr/local/bin:$PATH
15+
16+
if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then
17+
18+
echo '==================================> BEFORE_INSTALL'
19+
20+
. .drone/before-install.sh
21+
22+
echo '==================================> INSTALL'
23+
24+
cd ..
25+
git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
26+
cd boost-root
27+
git submodule update --init --jobs 8 tools/build
28+
git submodule update --init --jobs 8 libs/config
29+
git submodule update --init --jobs 8 tools/boostdep
30+
mkdir -p libs/numeric/
31+
cp -rp $TRAVIS_BUILD_DIR/. libs/numeric/ublas
32+
python tools/boostdep/depinst/depinst.py -I benchmarks numeric/ublas
33+
./bootstrap.sh
34+
./b2 -j 8 headers
35+
export BOOST_ROOT="`pwd`"
36+
37+
echo '==================================> SCRIPT'
38+
39+
echo "using $TOOLSET : : $COMPILER ;" >> ~/user-config.jam;
40+
echo "using clblas : : <include>${CLBLAS_PREFIX}/include <search>${CLBLAS_PREFIX}/lib ;" >> ~/user-config.jam;
41+
cp $TRAVIS_BUILD_DIR/opencl.jam ~/
42+
cp $TRAVIS_BUILD_DIR/clblas.jam ~/
43+
cd libs/numeric/ublas
44+
$BOOST_ROOT/b2 -j 8 test toolset=$TOOLSET cxxstd=$CXXSTD
45+
46+
fi

0 commit comments

Comments
 (0)