Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ windowsglobalimage="cppalliance/dronevs2019"

def main(ctx):
return [
linux_cxx("GCC-6, no RTTI", "g++", packages="g++-6", buildtype="empty-aa99f335d3", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=98,03,11,14,1y toolset=gcc-6 cxxflags="--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD -fno-rtti" linkflags="--coverage -lasan -lubsan"', 'GCOVTOOL': 'gcov-6', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("GCC-8", "g++", packages="g++-8", buildtype="empty-aa99f335d3", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=98,03,11,14,1z toolset=gcc-8 cxxflags="--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD" linkflags="--coverage -lasan -lubsan"', 'GCOVTOOL': 'gcov-8', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv, privileged=True),
linux_cxx("GCC-4.6", "g++", packages="g++-4.6", buildtype="empty-aa99f335d3", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=98,0x toolset=gcc-4.6 cxxflags="--coverage -DBOOST_TRAVISCI_BUILD" linkflags="--coverage"', 'GCOVTOOL': 'gcov-4.6', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
linux_cxx("Clang-8", "g++", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="empty-aa99f335d3", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=14,1z toolset=clang-8 cxxflags="--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD" linkflags="--coverage -fsanitize=address,leak,undefined"', 'GCOVTOOL': 'gcov_for_clang.sh', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv, privileged=True),
linux_cxx("Clang-3.8, libc++", "g++", packages="libc++-dev", buildtype="empty-aa99f335d3", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=03,11,14 toolset=clang-libc++ cxxflags="--coverage -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD" linkflags="--coverage"', 'GCOVTOOL': 'gcov_for_clang.sh', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
linux_cxx("GCC-6, no RTTI", "g++", packages="g++-6", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=98,03,11,14,1y toolset=gcc-6 cxxflags="--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD -fno-rtti" linkflags="--coverage -lasan -lubsan"', 'GCOVTOOL': 'gcov-6', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("GCC-8", "g++", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=98,03,11,14,1z toolset=gcc-8 cxxflags="--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD" linkflags="--coverage -lasan -lubsan"', 'GCOVTOOL': 'gcov-8', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv, privileged=True),
linux_cxx("GCC-4.6", "g++", packages="g++-4.6", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=98,0x toolset=gcc-4.6 cxxflags="--coverage -DBOOST_TRAVISCI_BUILD" linkflags="--coverage"', 'GCOVTOOL': 'gcov-4.6', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
linux_cxx("Clang-8", "g++", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=14,1z toolset=clang-8 cxxflags="--coverage -fsanitize=address,leak,undefined -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD" linkflags="--coverage -fsanitize=address,leak,undefined"', 'GCOVTOOL': 'gcov_for_clang.sh', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv, privileged=True),
linux_cxx("Clang-3.8, libc++", "g++", packages="libc++-dev", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'B2_ARGS': 'cxxstd=03,11,14 toolset=clang-libc++ cxxflags="--coverage -fno-sanitize-recover=undefined -DBOOST_TRAVISCI_BUILD" linkflags="--coverage"', 'GCOVTOOL': 'gcov_for_clang.sh', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
]

# from https://github.com/boostorg/boost-ci
Expand Down
30 changes: 0 additions & 30 deletions .drone/after-success.sh

This file was deleted.

36 changes: 0 additions & 36 deletions .drone/before-install.sh

This file was deleted.

59 changes: 52 additions & 7 deletions .drone/drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,72 @@ set -x
export TRAVIS_BUILD_DIR=$(pwd)
export DRONE_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
export TRAVIS_EVENT_TYPE=$DRONE_BUILD_EVENT
export VCS_COMMIT_ID=$DRONE_COMMIT
export GIT_COMMIT=$DRONE_COMMIT
export REPO_NAME=$DRONE_REPO
export USER=$(whoami)
export CC=${CC:-gcc}
export PATH=~/.local/bin:/usr/local/bin:$PATH

if [ "$DRONE_JOB_BUILDTYPE" == "empty-aa99f335d3" ]; then

echo '==================================> BEFORE_INSTALL'

. .drone/before-install.sh
if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then

echo '==================================> INSTALL'


BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
IGNORE_COVERAGE=''
BOOST_LIBS_FOLDER=$(basename $REPO_NAME)
UBSAN_OPTIONS=print_stacktrace=1
LSAN_OPTIONS=verbosity=1:log_threads=1
BOOST=$HOME/boost-local
echo "git clone -b $BOOST_BRANCH --depth 10 https://github.com/boostorg/boost.git $BOOST"
git clone -b $BOOST_BRANCH --depth 10 https://github.com/boostorg/boost.git $BOOST
cd $BOOST
git submodule update --init --depth 10 tools/build tools/boostdep
echo "Testing $BOOST/libs/$BOOST_LIBS_FOLDER moved from $TRAVIS_BUILD_DIR, branch $BOOST_BRANCH"
rm -rf $BOOST/libs/$BOOST_LIBS_FOLDER || true
cp -rp $TRAVIS_BUILD_DIR $BOOST/libs/$BOOST_LIBS_FOLDER
python tools/boostdep/depinst/depinst.py --git_args "--depth 10 --jobs 2" $BOOST_LIBS_FOLDER
git status
./bootstrap.sh
./b2 headers
echo "using gcc ;" >> ~/user-config.jam
echo "using clang ;" >> ~/user-config.jam
echo "using clang : 3.8 : clang++-3.8 ;" >> ~/user-config.jam
echo "using clang : 4 : clang++-4.0 ;" >> ~/user-config.jam
echo "using clang : 5 : clang++-5.0 ;" >> ~/user-config.jam
echo "using clang : 6 : clang++-6.0 ;" >> ~/user-config.jam
echo "using clang : 7 : clang++-7.0 ;" >> ~/user-config.jam
echo "using clang : 8 : clang++-8 ;" >> ~/user-config.jam
echo "using clang : libc++ : clang++-libc++ ;" >> ~/user-config.jam
cd $BOOST/libs/$BOOST_LIBS_FOLDER/test/

echo '==================================> SCRIPT'

sh -c "../../../b2 -j2 $B2_ARGS"

echo '==================================> AFTER_SUCCESS'

. $DRONE_BUILD_DIR/.drone/after-success.sh
mkdir -p $TRAVIS_BUILD_DIR/coverals
find ../../../bin.v2/ -name "*.gcda" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
find ../../../bin.v2/ -name "*.gcno" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
find ../../../bin.v2/ -name "*.da" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
find ../../../bin.v2/ -name "*.no" -exec cp "{}" $TRAVIS_BUILD_DIR/coverals/ \;
wget https://github.com/linux-test-project/lcov/archive/v1.14.zip
unzip v1.14.zip
LCOV="`pwd`/lcov-1.14/bin/lcov --gcov-tool $GCOVTOOL"
mkdir -p ~/.local/bin
echo -e '#!/bin/bash\nexec llvm-cov gcov "$@"' > ~/.local/bin/gcov_for_clang.sh
chmod 755 ~/.local/bin/gcov_for_clang.sh
echo "$LCOV --directory $TRAVIS_BUILD_DIR/coverals --base-directory `pwd` --capture --output-file $TRAVIS_BUILD_DIR/coverals/coverage.info"
$LCOV --directory $TRAVIS_BUILD_DIR/coverals --base-directory `pwd` --capture --output-file $TRAVIS_BUILD_DIR/coverals/coverage.info
cd $BOOST
$LCOV --remove $TRAVIS_BUILD_DIR/coverals/coverage.info "/usr*" "*/$BOOST_LIBS_FOLDER/test/*" $IGNORE_COVERAGE "*/$BOOST_LIBS_FOLDER/tests/*" "*/$BOOST_LIBS_FOLDER/examples/*" "*/$BOOST_LIBS_FOLDER/example/*" -o $TRAVIS_BUILD_DIR/coverals/coverage.info
OTHER_LIBS=`grep "submodule .*" .gitmodules | sed 's/\[submodule\ "\(.*\)"\]/"\*\/boost\/\1\.hpp" "\*\/boost\/\1\/\*"/g'| sed "/\"\*\/boost\/$BOOST_LIBS_FOLDER\/\*\"/d" | sed ':a;N;$!ba;s/\n/ /g'`
echo $OTHER_LIBS
eval "$LCOV --remove $TRAVIS_BUILD_DIR/coverals/coverage.info $OTHER_LIBS -o $TRAVIS_BUILD_DIR/coverals/coverage.info"
cd $TRAVIS_BUILD_DIR
gem install coveralls-lcov || echo "ERROR. Failed to install coveralls-lcov"
coveralls-lcov coverals/coverage.info

fi