Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compilers in Drone CI #91

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
33 changes: 20 additions & 13 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,37 @@
# As the yaml syntax for Drone CI is rather limited.
#
#
globalenv={'BUILD_SYSTEM': 'cmake', 'BOOST_URL': 'https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2'}
globalenv={'BUILD_SYSTEM': 'cmake', 'BOOST_URL': 'https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.bz2'}
linuxglobalimage="cppalliance/droneubuntu1604:1"
windowsglobalimage="cppalliance/dronevs2019"

def main(ctx):
return [
linux_cxx("COMMENT=docs Job 0", "g++", packages="docbook docbook-xml docbook-xsl xsltproc libsaxonhe-java default-jre-headless flex bison rsync", buildtype="5a7d01e40a-dded1b7a0c", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'COMMENT': 'docs', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv),
linux_cxx("VARIANT=coverage MATRIX_EVAL=CC=gcc-7 && CXX Job 1", "gcc-7", packages="g++-7 software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'coverage', 'MATRIX_EVAL': 'CC=gcc-7 && CXX=g++-7', 'DRONE_JOB_UUID': '356a192b79', 'CODECOV_TOKEN': {'from_secret': 'codecov_token'}, 'COVERALLS_REPO_TOKEN': {'from_secret': 'coveralls_repo_token'}}, globalenv=globalenv),
linux_cxx("VARIANT=coverage MATRIX_EVAL=CC=gcc-7 && CXX Job 1", "gcc-7", packages="g++-7 software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'coverage', 'MATRIX_EVAL': 'CC=gcc-7 && CXX=g++-7', 'DRONE_JOB_UUID': '356a192b79', 'CODECOV_TOKEN': {'from_secret': 'codecov_token'}, 'COVERALLS_REPO_TOKEN': {'from_secret': 'coveralls_repo_token'}}, globalenv=globalenv),
# not building #
# osx_cxx("VARIANT=debug Job 2", "g++", packages="", buildtype="boost", buildscript="drone", xcode_version="10.1", environment={'VARIANT': 'debug', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv),
# not building #
# osx_cxx("VARIANT=release Job 3", "g++", packages="", buildtype="boost", buildscript="drone", xcode_version="10.1", environment={'VARIANT': 'release', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-5 && CXX=g+ Job 4", "gcc-5", packages="g++-5 software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-5 && CXX=g++-5', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-6 && CXX=g+ Job 5", "gcc-6", packages="g++-6 software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-6 && CXX=g++-6', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-7 && CXX=g+ Job 6", "gcc-7", packages="g++-7 software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-7 && CXX=g++-7', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-8 && CXX=g+ Job 7", "gcc-8", packages="g++-8 software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-8 && CXX=g++-8', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
linux_cxx("VARIANT=release MATRIX_EVAL=CC=gcc-8 && CXX= Job 8", "gcc-8", packages="g++-8 software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'release', 'MATRIX_EVAL': 'CC=gcc-8 && CXX=g++-8', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-5 && CXX=g+ Job 4", "gcc-5", packages="g++-5 software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-5 && CXX=g++-5', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-6 && CXX=g+ Job 5", "gcc-6", packages="g++-6 software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-6 && CXX=g++-6', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-7 && CXX=g+ Job 6", "gcc-7", packages="g++-7 software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-7 && CXX=g++-7', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-8 && CXX=g+ Job 7", "gcc-8", packages="g++-8 software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-8 && CXX=g++-8', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv),
linux_cxx("VARIANT=release MATRIX_EVAL=CC=gcc-8 && CXX= Job 8", "gcc-8", packages="g++-8 software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'release', 'MATRIX_EVAL': 'CC=gcc-8 && CXX=g++-8', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-9 && CXX=g+", "gcc-9", packages="g++-9 software-properties-common wget libstdc++-9-dev binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-9 && CXX=g++-9', 'DRONE_JOB_UUID': '902ba3cda2'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-10 && CXX=g+", "gcc-10", packages="g++-10 software-properties-common wget libstdc++-9-dev binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-10 && CXX=g++-10', 'DRONE_JOB_UUID': '902ba3cda3'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=gcc-11 && CXX=g+", "gcc-11", packages="g++-11 software-properties-common wget libstdc++-9-dev binutils-gold gdb make ninja-build ccache npm libc6-dbg", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=gcc-11 && CXX=g++-11', 'DRONE_JOB_UUID': '902ba3cda4'}, globalenv=globalenv),
# not building #
# linux_cxx("VARIANT=reldeb WITH_VALGRIND=1 MATRIX_EVAL=C Job 9", "gcc-8", packages="g++-8 software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg subversion", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'reldeb', 'WITH_VALGRIND': '1', 'MATRIX_EVAL': 'CC=gcc-8 && CXX=g++-8', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-6.0 && CX Job 10", "clang-6.0", packages="software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-6.0 && CXX=clang++-6.0', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-7 && CXX= Job 11", "clang-7", packages="software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-7 && CXX=clang++-7', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-8 && CXX= Job 12", "clang-8", packages="software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-8 && CXX=clang++-8', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
linux_cxx("VARIANT=usan MATRIX_EVAL=CC=clang-8 && CXX=c Job 13", "clang-8", packages="software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg clang-8 libclang-common-8-dev", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'usan', 'MATRIX_EVAL': 'CC=clang-8 && CXX=clang++-8', 'UBSAN_OPTIONS': "'print_stacktrace=1'", 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
linux_cxx("VARIANT=asan MATRIX_EVAL=CC=clang-8 && CXX=c Job 14", "clang-8", packages="software-properties-common wget python-software-properties libstdc++6 binutils-gold gdb make ninja-build ccache python-pip npm libc6-dbg clang-8 libclang-common-8-dev llvm-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'asan', 'MATRIX_EVAL': 'CC=clang-8 && CXX=clang++-8', 'DRONE_EXTRA_PRIVILEGED': 'True', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv, privileged=True),
# linux_cxx("VARIANT=reldeb WITH_VALGRIND=1 MATRIX_EVAL=C Job 9", "gcc-8", packages="g++-8 software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg subversion", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'reldeb', 'WITH_VALGRIND': '1', 'MATRIX_EVAL': 'CC=gcc-8 && CXX=g++-8', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-6.0 && CX Job 10", "clang-6.0", packages="software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-6.0 && CXX=clang++-6.0', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-7 && CXX= Job 11", "clang-7", packages="software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-7 && CXX=clang++-7', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-8 && CXX= Job 12", "clang-8", packages="software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-8 && CXX=clang++-8', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-9", "clang-9", packages="software-properties-common wget libstdc++-9-dev binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-9", llvm_os="focal", llvm_ver="9", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-9 && CXX=clang++-9', 'DRONE_JOB_UUID': '7b52009b65'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-10", "clang-10", packages="software-properties-common wget libstdc++-9-dev binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-10", llvm_os="focal", llvm_ver="10", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-10 && CXX=clang++-10', 'DRONE_JOB_UUID': '7b52009b66'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-11", "clang-11", packages="software-properties-common wget libstdc++-9-dev binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-11", llvm_os="focal", llvm_ver="11", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-11 && CXX=clang++-11', 'DRONE_JOB_UUID': '7b52009b67'}, globalenv=globalenv),
linux_cxx("VARIANT=debug MATRIX_EVAL=CC=clang-12", "clang-12", packages="software-properties-common wget libstdc++-9-dev binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-12", llvm_os="focal", llvm_ver="12", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:1", environment={'VARIANT': 'debug', 'MATRIX_EVAL': 'CC=clang-12 && CXX=clang++-12', 'DRONE_JOB_UUID': '7b52009b68'}, globalenv=globalenv),
linux_cxx("VARIANT=usan MATRIX_EVAL=CC=clang-8 && CXX=c Job 13", "clang-8", packages="software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-8 libclang-common-8-dev", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'usan', 'MATRIX_EVAL': 'CC=clang-8 && CXX=clang++-8', 'UBSAN_OPTIONS': "'print_stacktrace=1'", 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv),
linux_cxx("VARIANT=asan MATRIX_EVAL=CC=clang-8 && CXX=c Job 14", "clang-8", packages="software-properties-common wget libstdc++6 binutils-gold gdb make ninja-build ccache npm libc6-dbg clang-8 libclang-common-8-dev llvm-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu1604:1", environment={'VARIANT': 'asan', 'MATRIX_EVAL': 'CC=clang-8 && CXX=clang++-8', 'DRONE_EXTRA_PRIVILEGED': 'True', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv, privileged=True),
]

# from https://github.com/boostorg/boost-ci
Expand Down
6 changes: 4 additions & 2 deletions .drone/drone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 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
set -xe
export TRAVIS_BUILD_DIR=$(pwd)
export DRONE_BUILD_DIR=$(pwd)
export TRAVIS_BRANCH=$DRONE_BRANCH
Expand All @@ -15,7 +15,7 @@ export REPO_NAME=$DRONE_REPO
export USER=$(whoami)
export CC=${CC:-gcc}
export PATH=~/.local/bin:/usr/local/bin:$PATH
export BOOST_ROOT="$TRAVIS_BUILD_DIR/_cache/boost_1_69_0"
export BOOST_ROOT="$TRAVIS_BUILD_DIR/_cache/boost_1_77_0"
export EP_CACHE_ROOT="$TRAVIS_BUILD_DIR/_cache/cmake_ep"
export CMAKE_ROOT="$TRAVIS_BUILD_DIR/_cache/cmake"
export LCOV_ROOT="$TRAVIS_BUILD_DIR/_cache/lcov"
Expand All @@ -25,6 +25,8 @@ if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then

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

echo "Upgrading cmake"
pip3 install cmake --upgrade
. .drone/before-install.sh

echo '==================================> INSTALL'
Expand Down
19 changes: 18 additions & 1 deletion scripts/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,28 @@ function build_cmake {
##################################### BUILD ####################################

if [[ ${BUILD_SYSTEM:-} == cmake ]]; then
build_cmake
build_cmake || true
else
build_bjam
fi

echo "_debugging_" || true
shopt -s globstar
for file in /drone/src/_cache/cmake_ep/ninja/*/Debug/src/rocksdb-stamp/rocksdb-build-*.log ; do
sleep 10 || true
echo logfile is $file || true
ls -al $file || true
echo -- || true
echo tail file: || true
echo -- || true
tail -n 100 $file || true
echo -- || true
echo cat file: || true
echo -- || true
cat $file || true
done
echo "_debugging_ _end_" || true

##################################### TESTS ####################################

if [[ ${VARIANT} == coverage ]]; then
Expand Down