Skip to content

Commit 4024947

Browse files
committed
add drone config [ci skip]
1 parent 0414abe commit 4024947

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

.drone.star

Lines changed: 25 additions & 0 deletions
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={'B2_VARIANT': 'variant=release,debug'}
12+
linuxglobalimage="cppalliance/droneubuntu1404:1"
13+
windowsglobalimage="cppalliance/dronevs2019"
14+
15+
def main(ctx):
16+
return [
17+
linux_cxx("COMMENT=C++03 TOOLSET=gcc,gcc-7 Job 0", "g++", packages="g++-7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'C++03', 'TOOLSET': 'gcc,gcc-7', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
18+
linux_cxx("COMMENT=C++11 TOOLSET=clang CXXSTD=11 Job 1", "clang++", packages="g++-7", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'C++11', 'TOOLSET': 'clang', 'CXXSTD': '11', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv),
19+
linux_cxx("COMMENT=valgrind TOOLSET=clang B2_VARIANT=var Job 2", "clang++", packages="clang-5.0 libstdc++-7-dev valgrind", llvm_os="trusty", llvm_ver="5.0", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'valgrind', 'TOOLSET': 'clang', 'B2_VARIANT': 'variant=debug', 'TESTFLAGS': 'testing.launcher=valgrind', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
20+
linux_cxx("COMMENT=cppcheck Job 3", "g++", packages="binutils-gold gdb libc6-dbg", buildtype="15edef0d20-06e41ec903", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'cppcheck', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
21+
linux_cxx("COMMENT=CodeCov TOOLSET=gcc-7 Job 4", "g++", packages="gcc-7 g++-7", buildtype="15edef0d20-35de83136e", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'CodeCov', 'TOOLSET': 'gcc-7', '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/drone.sh

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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 '==================================> INSTALL'
19+
20+
export SELF=`basename $REPO_NAME`
21+
cd ..
22+
git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
23+
cd boost-root
24+
git submodule update -q --init tools/boostdep
25+
git submodule update -q --init tools/build
26+
git submodule update -q --init tools/inspect
27+
cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
28+
export BOOST_ROOT="`pwd`"
29+
export PATH="`pwd`":$PATH
30+
python tools/boostdep/depinst/depinst.py $SELF --include example
31+
./bootstrap.sh
32+
./b2 headers
33+
34+
echo '==================================> SCRIPT'
35+
36+
cd libs/$SELF
37+
ci/build.sh
38+
39+
elif [ "$DRONE_JOB_BUILDTYPE" == "15edef0d20-06e41ec903" ]; then
40+
41+
echo '==================================> INSTALL'
42+
43+
export SELF=`basename $REPO_NAME`
44+
cd ..
45+
git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
46+
cd boost-root
47+
git submodule update -q --init tools/boostdep
48+
git submodule update -q --init tools/build
49+
git submodule update -q --init tools/inspect
50+
cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
51+
export BOOST_ROOT="`pwd`"
52+
export PATH="`pwd`":$PATH
53+
python tools/boostdep/depinst/depinst.py $SELF --include example
54+
./bootstrap.sh
55+
./b2 headers
56+
57+
echo '==================================> SCRIPT'
58+
59+
libs/$SELF/ci/cppcheck.sh
60+
61+
elif [ "$DRONE_JOB_BUILDTYPE" == "15edef0d20-35de83136e" ]; then
62+
63+
echo '==================================> INSTALL'
64+
65+
export SELF=`basename $REPO_NAME`
66+
cd ..
67+
git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
68+
cd boost-root
69+
git submodule update -q --init tools/boostdep
70+
git submodule update -q --init tools/build
71+
git submodule update -q --init tools/inspect
72+
cp -r $TRAVIS_BUILD_DIR/* libs/$SELF
73+
export BOOST_ROOT="`pwd`"
74+
export PATH="`pwd`":$PATH
75+
python tools/boostdep/depinst/depinst.py $SELF --include example
76+
./bootstrap.sh
77+
./b2 headers
78+
79+
echo '==================================> SCRIPT'
80+
81+
pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && cd lcov && sudo make install && which lcov && lcov --version && popd
82+
cd libs/$SELF
83+
ci/codecov.sh
84+
85+
fi

0 commit comments

Comments
 (0)