Skip to content

Commit d8995bc

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

File tree

5 files changed

+90
-0
lines changed

5 files changed

+90
-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", 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", 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", 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", 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", 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/after-success.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+

.drone/before-install.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
if [ "$DRONE_JOB_UUID" = "b6589fc6ab" ] || [ "$DRONE_JOB_UUID" = "356a192b79" ] || [ "$DRONE_JOB_UUID" = "da4b9237ba" ] || [ "$DRONE_JOB_UUID" = "77de68daec" ] || [ "$DRONE_JOB_UUID" = "1b64538924" ] ; then
4+
export CLBLAS_PREFIX="${TRAVIS_BUILD_DIR}/CLBLAS/"
5+
export PATH="${CLBLAS_PREFIX}/bin:$PATH"
6+
export LD_LIBRARY_PATH="${CLBLAS_PREFIX}/lib:$LD_LIBRARY_PATH"
7+
if [ ${TRAVIS_OS_NAME} == "linux" ]; then .ci/install-ocl-ubuntu.sh; fi
8+
.ci/install-clblas.sh
9+
cmake --version;
10+
true ${CC} --version;
11+
${CXX} --version;
12+
fi
13+

.drone/before-script.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+

.drone/boost.sh

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
export TRAVIS_BUILD_DIR=$(pwd)
5+
export TRAVIS_BRANCH=$DRONE_BRANCH
6+
export TRAVIS_OS_NAME=${DRONE_JOB_OS_NAME:-linux}
7+
export VCS_COMMIT_ID=$DRONE_COMMIT
8+
export GIT_COMMIT=$DRONE_COMMIT
9+
export DRONE_CURRENT_BUILD_DIR=$(pwd)
10+
export PATH=~/.local/bin:/usr/local/bin:$PATH
11+
12+
echo '==================================> BEFORE_INSTALL'
13+
14+
. .drone/before-install.sh
15+
16+
echo '==================================> INSTALL'
17+
18+
cd ..
19+
git clone -b master --depth 1 https://github.com/boostorg/boost.git boost-root
20+
cd boost-root
21+
git submodule update --init --jobs 8 tools/build
22+
git submodule update --init --jobs 8 libs/config
23+
git submodule update --init --jobs 8 tools/boostdep
24+
mkdir -p libs/numeric/
25+
cp -rp $TRAVIS_BUILD_DIR/. libs/numeric/ublas
26+
python tools/boostdep/depinst/depinst.py -I benchmarks numeric/ublas
27+
./bootstrap.sh
28+
./b2 -j 8 headers
29+
export BOOST_ROOT="`pwd`"
30+
31+
echo '==================================> BEFORE_SCRIPT'
32+
33+
. $DRONE_CURRENT_BUILD_DIR/.drone/before-script.sh
34+
35+
echo '==================================> SCRIPT'
36+
37+
echo "using $TOOLSET : : $COMPILER ;" >> ~/user-config.jam;
38+
echo "using clblas : : <include>${CLBLAS_PREFIX}/include <search>${CLBLAS_PREFIX}/lib ;" >> ~/user-config.jam;
39+
cp $TRAVIS_BUILD_DIR/opencl.jam ~/
40+
cp $TRAVIS_BUILD_DIR/clblas.jam ~/
41+
cd libs/numeric/ublas
42+
$BOOST_ROOT/b2 -j 8 test toolset=$TOOLSET cxxstd=$CXXSTD
43+
44+
echo '==================================> AFTER_SUCCESS'
45+
46+
. $DRONE_CURRENT_BUILD_DIR/.drone/after-success.sh

0 commit comments

Comments
 (0)