From bd3dd012594faa4caf66bf0e1fd0c912b7fbab9c Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Thu, 23 Oct 2025 15:52:31 +0200 Subject: [PATCH] Update Drone from Boost.CI --- .drone.star | 202 +++++++++++++++---------------- .drone/codecov_coveralls.sh | 28 +++++ .drone/drone.bat | 31 ----- .drone/drone.sh | 231 ------------------------------------ 4 files changed, 129 insertions(+), 363 deletions(-) create mode 100644 .drone/codecov_coveralls.sh delete mode 100644 .drone/drone.bat delete mode 100755 .drone/drone.sh diff --git a/.drone.star b/.drone.star index e1a381d..8b74829 100644 --- a/.drone.star +++ b/.drone.star @@ -2,116 +2,116 @@ # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE.txt) # -# Copyright Rene Rivera 2020. -# Copyright Alan de Freitas 2022. - +# Copyright (c) 2020 Rene Rivera +# Copyright (c) 2022 Alan de Freitas +# Copyright (c) 2022-2025 Alexander Grund # For Drone CI we use the Starlark scripting language to reduce duplication. # As the yaml syntax for Drone CI is rather limited. -# -# -globalenv={'B2_CI_VERSION': '1', 'B2_VARIANT': 'release'} -linuxglobalimage="cppalliance/droneubuntu1804:1" -windowsglobalimage="cppalliance/dronevs2019" + +# Base environment for all jobs +globalenv={'B2_VARIANT': 'release'} + +# Wrapper function to apply the globalenv to all jobs +def job( + # job specific environment options + env={}, + **kwargs): + real_env = dict(globalenv) + real_env.update(env) + return job_impl(env=real_env, **kwargs) def main(ctx): return [ - # Priorities: (no 2a, no betas) - # - # coverage - # latest gcc: 17,20 - # latest clang: 17,20 - # oldest gcc: 11 - # oldest clang: 11 - # asan - # tsan - # ubsan - # valgrind - # arm64 - # s390x - # docs - # cmake superproject - # cmake install - # (...the rest) + job(compiler='clang-3.8', cxxstd='11,14', os='ubuntu-16.04'), + job(compiler='clang-3.9', cxxstd='11,14', os='ubuntu-18.04'), + job(compiler='clang-4.0', cxxstd='11,14', os='ubuntu-18.04'), + job(compiler='clang-5.0', cxxstd='11,14,1z', os='ubuntu-18.04'), + job(compiler='clang-6.0', cxxstd='11,14,17', os='ubuntu-18.04'), + job(compiler='clang-7', cxxstd='11,14,17', os='ubuntu-18.04'), + job(compiler='clang-8', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + job(compiler='clang-9', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + job(compiler='clang-10', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + job(compiler='clang-11', cxxstd='11,14,17,2a', os='ubuntu-22.04'), + job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-22.04'), + job(compiler='clang-13', cxxstd='11,14,17,20,2b', os='ubuntu-22.04'), + job(compiler='clang-14', cxxstd='11,14,17,20,2b', os='ubuntu-22.04'), + job(compiler='clang-15', cxxstd='11,14,17,20,2b', os='ubuntu-22.04', add_llvm=True, + env={'B2_CXXFLAGS': '-Werror'}), + job(name='Clang 15 standalone', compiler='clang-15', cxxstd='11,14,17,20,2b', os='ubuntu-22.04', add_llvm=True, + env={'B2_CXXFLAGS': '-Werror', 'B2_DEFINES': 'BOOST_STATIC_STRING_STANDALONE'}), - # Coverage - linux_cxx("Coverage", "g++-8", packages="g++-8", buildscript="drone", buildtype="codecov", image=linuxglobalimage, environment={'COMMENT': 'codecov.io', 'LCOV_BRANCH_COVERAGE': '0', 'B2_CXXSTD': '11', 'B2_TOOLSET': 'gcc-8', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', "CODECOV_TOKEN": {"from_secret": "codecov_token"}, "COVERALLS_REPO_TOKEN": {"from_secret": "coveralls_repo_token"}}, globalenv=globalenv), + job(compiler='gcc-4.8', cxxstd='11', os='ubuntu-16.04'), + job(compiler='gcc-4.9', cxxstd='11', os='ubuntu-16.04'), + job(compiler='gcc-5', cxxstd='11,14,1z', os='ubuntu-18.04'), + job(compiler='gcc-6', cxxstd='11,14,1z', os='ubuntu-18.04'), + job(compiler='gcc-7', cxxstd='11,14,1z', os='ubuntu-18.04'), + job(compiler='gcc-8', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + job(compiler='gcc-9', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + job(compiler='gcc-10', cxxstd='11,14,17,20', os='ubuntu-22.04'), + job(compiler='gcc-11', cxxstd='11,14,17,20,2b', os='ubuntu-22.04'), + job(compiler='gcc-12', cxxstd='11,14,17,20,2b', os='ubuntu-22.04'), - # Latest gcc - linux_cxx("GCC 12: C++17,20", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'B2_TOOLSET': 'gcc-12', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), - linux_cxx("GCC 12: C++17,20 Standalone", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'B2_TOOLSET': 'gcc-12', 'B2_CXXFLAGS': '-Werror', 'B2_DEFINES': 'define=BOOST_STATIC_STRING_STANDALONE', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), + job(name='Coverage', buildtype='codecov', buildscript='codecov_coveralls', env={'LCOV_BRANCH_COVERAGE': 1, "COVERALLS_REPO_TOKEN": {"from_secret": "coveralls_repo_token"}}, + compiler='gcc-8', cxxstd='11,14,17,2a', os='ubuntu-18.04'), + # Sanitizers + job(name='ASAN', asan=True, + compiler='gcc-12', cxxstd='11,14,17,20', os='ubuntu-22.04'), + job(name='UBSAN', ubsan=True, + compiler='gcc-12', cxxstd='11,14,17,20', os='ubuntu-22.04'), + job(name='TSAN', tsan=True, + compiler='gcc-12', cxxstd='11,14,17,20', os='ubuntu-22.04'), + job(name='Clang 14 w/ sanitizers', asan=True, ubsan=True, + compiler='clang-14', cxxstd='11,14,17,20', os='ubuntu-22.04'), + job(name='Clang 11 libc++ w/ sanitizers', asan=True, ubsan=True, # libc++-11 is the latest working with ASAN: https://github.com/llvm/llvm-project/issues/59432 + compiler='clang-11', cxxstd='11,14,17,20', os='ubuntu-20.04', stdlib='libc++', install='libc++-11-dev libc++abi-11-dev'), + job(name='Valgrind', valgrind=True, + compiler='clang-6.0', cxxstd='11,14,1z', os='ubuntu-18.04', install='libc6-dbg libc++-dev libstdc++-8-dev'), - # Latest clang - linux_cxx("Clang 15: C++17,20", "clang++-15", packages="clang-15 libstdc++-10-dev", llvm_os="jammy", llvm_ver="15", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'B2_TOOLSET': 'clang-15', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), - linux_cxx("Clang 15: C++17,20 Standalone", "clang++-15", packages="clang-15 libstdc++-10-dev", llvm_os="jammy", llvm_ver="15", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'B2_TOOLSET': 'clang-15', 'B2_CXXFLAGS': '-Werror', 'B2_DEFINES': 'define=BOOST_STATIC_STRING_STANDALONE', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), + # libc++ + job(compiler='clang-6.0', cxxstd='11,14,17,2a', os='ubuntu-18.04', stdlib='libc++', install='libc++-dev libc++abi-dev'), + job(compiler='clang-7', cxxstd='11,14,17,2a', os='ubuntu-20.04', stdlib='libc++', install='libc++-7-dev libc++abi-7-dev'), + job(compiler='clang-8', cxxstd='11,14,17,2a', os='ubuntu-20.04', stdlib='libc++', install='libc++-8-dev libc++abi-8-dev'), + job(compiler='clang-9', cxxstd='11,14,17,2a', os='ubuntu-20.04', stdlib='libc++', install='libc++-9-dev libc++abi-9-dev'), + job(compiler='clang-10', cxxstd='11,14,17,20', os='ubuntu-20.04', stdlib='libc++', install='libc++-10-dev libc++abi-10-dev'), + job(compiler='clang-11', cxxstd='11,14,17,20', os='ubuntu-20.04', stdlib='libc++', install='libc++-11-dev libc++abi-11-dev'), + job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-22.04', stdlib='libc++', install='libc++-12-dev libc++abi-12-dev libunwind-12-dev'), + job(compiler='clang-13', cxxstd='11,14,17,20', os='ubuntu-22.04', stdlib='libc++', install='libc++-13-dev libc++abi-13-dev'), + job(compiler='clang-14', cxxstd='11,14,17,20', os='ubuntu-22.04', stdlib='libc++', install='libc++-14-dev libc++abi-14-dev'), + job(compiler='clang-15', cxxstd='11,14,17,20', os='ubuntu-22.04', stdlib='libc++', install='libc++-15-dev libc++abi-15-dev', add_llvm=True), - # Oldest compilers - linux_cxx("GCC 4.8: C++11", "g++-4.8", packages="g++-4.8", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'B2_TOOLSET': 'gcc-4.8', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '11'}, globalenv=globalenv), - linux_cxx("GCC 4.8: C++11 Standalone", "g++-4.8", packages="g++-4.8", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'B2_TOOLSET': 'gcc-4.8', 'B2_CXXFLAGS': '-Werror', 'B2_DEFINES': 'define=BOOST_STATIC_STRING_STANDALONE', 'B2_CXXSTD': '11'}, globalenv=globalenv), - linux_cxx("Clang 3.8: C++11", "clang++-3.8", packages="clang-3.8", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'B2_VARIANT': 'debug', 'B2_CXXFLAGS': '-Werror', 'B2_TOOLSET': 'clang-3.8', 'B2_CXXSTD': '11'}, globalenv=globalenv), - linux_cxx("Clang 3.8: C++11 Standalone", "clang++-3.8", packages="clang-3.8", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'B2_VARIANT': 'debug', 'B2_CXXFLAGS': '-Werror', 'B2_TOOLSET': 'clang-3.8', 'B2_DEFINES': 'define=BOOST_STATIC_STRING_STANDALONE', 'B2_CXXSTD': '11'}, globalenv=globalenv), - - # Sanitizers + Valgrind - linux_cxx("ASan", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'asan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_ASAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'DRONE_EXTRA_PRIVILEGED': 'True'}, globalenv=globalenv, privileged=True), - linux_cxx("TSan", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'tsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_TSAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1'}, globalenv=globalenv), - linux_cxx("UBSan", "g++-12", packages="g++-12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'ubsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-12', 'B2_CXXSTD': '11,14,17', 'B2_UBSAN': '1', 'B2_DEFINES': 'define=BOOST_NO_STRESS_TEST=1', 'B2_LINKFLAGS': '-fuse-ld=gold'}, globalenv=globalenv), - linux_cxx("Valgrind", "clang++-14", packages="clang-14 libc6-dbg libc++-dev libstdc++-9-dev", llvm_os="jammy", llvm_ver="14", buildscript="drone", buildtype="valgrind", image="cppalliance/droneubuntu2204:1", environment={'COMMENT': 'valgrind', 'B2_TOOLSET': 'clang-14', 'B2_CXXSTD': '11,14,17', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'B2_VARIANT': 'debug', 'B2_TESTFLAGS': 'testing.launcher=valgrind', 'VALGRIND_OPTS': '--error-exitcode=1'}, globalenv=globalenv), - - # arm64 (unsigned char) - linux_cxx("ARM64: GCC 11", "g++-11", packages="g++-11", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2004:multiarch", environment={'B2_TOOLSET': 'gcc-11', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, arch="arm64", globalenv=globalenv), - - # s390x - linux_cxx("S390x: Clang 12", "clang++-12", packages="clang-12 libstdc++-9-dev", llvm_os="focal", llvm_ver="12", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:multiarch", environment={'B2_TOOLSET': 'clang-12', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, arch="s390x", globalenv=globalenv), - - # Documentation - # linux_cxx("Docs", "g++", packages="docbook docbook-xml docbook-xsl python3-jinja2 xsltproc flex libfl-dev bison unzip rsync", buildtype="docs", buildscript="drone", image="cppalliance/droneubuntu1804:1", environment={'COMMENT': 'docs'}, globalenv=globalenv), - - # CMake tests (https://github.com/boostorg/boost-ci) - ## Compiling as part of the boost superproject - linux_cxx("CMake Superproject", "g++", packages="", buildscript="drone", buildtype="cmake-superproject", image="cppalliance/droneubuntu1804:1", globalenv=globalenv), - ## Installing - # linux_cxx("CMake Install", "g++", packages="", buildscript="drone", buildtype="cmake1", image="cppalliance/droneubuntu1804:1", environment={'CMAKE_INSTALL_TEST': '1'}, globalenv=globalenv), - - # ------------------------------------------------------------------ - - # OSX - osx_cxx("OSX: Clang", "g++", packages="", buildscript="drone", buildtype="boost", xcode_version="13.4.1", environment={'B2_TOOLSET': 'clang', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '11,17'}, globalenv=globalenv), - - # GCC (All other versions) - linux_cxx("GCC 4.9: C++11", "g++-4.9", packages="g++-4.9", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu1604:1", environment={'B2_TOOLSET': 'gcc-4.9', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '11'}, globalenv=globalenv), - linux_cxx("GCC 5: C++11", "g++-5", packages="g++-5", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-5', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '11'}, globalenv=globalenv), - linux_cxx("GCC 6: C++11,14", "g++-6", packages="g++-6", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-6', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '11,14'}, globalenv=globalenv), - linux_cxx("GCC 7: C++14,17", "g++-7", packages="g++-7", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-7', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '14,17'}, globalenv=globalenv), - linux_cxx("GCC 8: C++17", "g++-8", packages="g++-8", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-8', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17'}, globalenv=globalenv), - linux_cxx("GCC 9: C++17", "g++-9", packages="g++-9", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-9', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17'}, globalenv=globalenv), - linux_cxx("GCC 10: C++17", "g++-10", packages="g++-10", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-10', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17'}, globalenv=globalenv), - linux_cxx("GCC 11: C++17,20", "g++-11", packages="g++-11", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'gcc-11', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), - - # Clang (All other versions) - linux_cxx("Clang 4.0: C++11,14", "clang++-4.0", packages="clang-4.0 libstdc++-6-dev", llvm_os="xenial", llvm_ver="4.0", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'B2_TOOLSET': 'clang-4.0', 'B2_CXXFLAGS': '', 'B2_CXXSTD': '11,14'}, globalenv=globalenv), - linux_cxx("Clang 5.0: C++11,14", "clang++-5.0", packages="clang-5.0 libstdc++-7-dev", llvm_os="bionic", llvm_ver="5.0", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-5.0', 'B2_CXXFLAGS': '', 'B2_CXXSTD': '11,14'}, globalenv=globalenv), - linux_cxx("Clang 6.0: C++11,14", "clang++-6.0", packages="clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev", llvm_os="bionic", llvm_ver="6.0", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-6.0', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '11,14', 'B2_STDLIB': 'libc++'}, globalenv=globalenv), - linux_cxx("Clang 6.0: C++14,17", "clang++-6.0", packages="clang-6.0 libc6-dbg libc++-dev libc++abi-dev libstdc++-8-dev", llvm_os="bionic", llvm_ver="6.0", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-6.0', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '14,17'}, globalenv=globalenv), - linux_cxx("Clang 7: C++17", "clang++-7", packages="clang-7 libc6-dbg libc++-dev libstdc++-8-dev", llvm_os="bionic", llvm_ver="7", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-7', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17'}, globalenv=globalenv), - linux_cxx("Clang 8: C++17", "clang++-8", packages="clang-8 libc6-dbg libc++-dev libstdc++-8-dev", llvm_os="bionic", llvm_ver="8", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-8', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17'}, globalenv=globalenv), - linux_cxx("Clang 9: C++14,17", "clang++-9", packages="clang-9 libstdc++-9-dev", llvm_os="bionic", llvm_ver="9", buildscript="drone", buildtype="boost", image=linuxglobalimage, environment={'B2_TOOLSET': 'clang-9', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '14,17'}, globalenv=globalenv), - linux_cxx("Clang 10: C++14,17", "clang++-10", packages="clang-10 libstdc++-9-dev", llvm_os="focal", llvm_ver="10", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'B2_TOOLSET': 'clang-10', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '14,17'}, globalenv=globalenv), - linux_cxx("Clang 11: C++14,17", "clang++-11", packages="clang-11 libstdc++-9-dev", llvm_os="focal", llvm_ver="11", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'B2_TOOLSET': 'clang-11', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '14,17'}, globalenv=globalenv), - linux_cxx("Clang 12: C++17,20", "clang++-12", packages="clang-12 libstdc++-9-dev", llvm_os="focal", llvm_ver="12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'B2_TOOLSET': 'clang-12', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), - linux_cxx("Clang 13: C++17,20", "clang++-13", packages="clang-13 libstdc++-10-dev", llvm_os="jammy", llvm_ver="13", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'B2_TOOLSET': 'clang-13', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), - linux_cxx("Clang 14: C++17,20", "clang++-14", packages="clang-14 libstdc++-10-dev", llvm_os="jammy", llvm_ver="14", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'B2_TOOLSET': 'clang-14', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17,20'}, globalenv=globalenv), - - # arm64 (unsigned char) - linux_cxx("ARM64: Clang 12", "clang++-12", packages="clang-12 libstdc++-9-dev", llvm_os="focal", llvm_ver="12", buildscript="drone", buildtype="boost", image="cppalliance/droneubuntu2004:multiarch", environment={'B2_TOOLSET': 'clang-12', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '11,14,17,20'}, arch="arm64", globalenv=globalenv), - - # s390x - linux_cxx("S390x: GCC 11", "g++-11", packages="g++-11", buildtype="boost", buildscript="drone", image="cppalliance/droneubuntu2004:multiarch", environment={'B2_TOOLSET': 'gcc-11', 'B2_CXXFLAGS': '-Werror', 'B2_CXXSTD': '17'}, arch="s390x", globalenv=globalenv), - - # MSVC - windows_cxx("MSVC 14.1", "", image="cppalliance/dronevs2017", buildtype="boost", buildscript="drone", environment={"B2_TOOLSET": "msvc-14.1", 'B2_CXXFLAGS': '/WX', "B2_CXXSTD": "11,14,17"},globalenv=globalenv), - windows_cxx("MSVC 14.2: C++14,17,latest", "", image="cppalliance/dronevs2019", buildtype="boost", buildscript="drone", environment={"B2_TOOLSET": "msvc-14.2", 'B2_CXXFLAGS': '/WX', "B2_CXXSTD": "14,17,latest"},globalenv=globalenv), - windows_cxx("MSVC 14.3: C++17,20", "", image="cppalliance/dronevs2022", buildtype="boost", buildscript="drone", environment={"B2_TOOLSET": "msvc-14.3", 'B2_CXXFLAGS': '/WX', "B2_CXXSTD": "17,20"},globalenv=globalenv), -] + # FreeBSD + job(compiler='clang-10', cxxstd='11,14,17,20', os='freebsd-13.1'), + job(compiler='clang-15', cxxstd='11,14,17,20', os='freebsd-13.1'), + job(compiler='gcc-11', cxxstd='11,14,17,20', os='freebsd-13.1', linkflags='-Wl,-rpath=/usr/local/lib/gcc11'), + # OSX + job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-10.1'), + job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-10.3'), + job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-11.1'), + job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-11.7'), + job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-12'), + job(compiler='clang', cxxstd='11,14,17,20', os='osx-xcode-12.5.1'), + job(compiler='clang', cxxstd='11,14,17,20', os='osx-xcode-13.0'), + job(compiler='clang', cxxstd='11,14,17,20', os='osx-xcode-13.4.1'), + job(compiler='clang', cxxstd='11,14,17,20,2b', os='osx-xcode-14.0'), + job(compiler='clang', cxxstd='11,14,17,20,2b', os='osx-xcode-14.3.1'), + job(compiler='clang', cxxstd='11,14,17,20,2b', os='osx-xcode-15.0.1'), + # ARM64 + job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='arm64', add_llvm=True), + job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='arm64'), + # S390x + job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='s390x', add_llvm=True), + job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='s390x'), + # Windows + job(compiler='msvc-14.0', cxxstd=None, os='windows', env={'B2_DONT_EMBED_MANIFEST': 1}), + job(compiler='msvc-14.1', cxxstd=None, os='windows'), + job(compiler='msvc-14.2', cxxstd=None, os='windows'), + job(compiler='msvc-14.3', cxxstd=None, os='windows'), + job(compiler='msvc-14.0', cxxstd='14,17,20', os='windows', env={'B2_DONT_EMBED_MANIFEST': 1}), + job(compiler='msvc-14.1', cxxstd='14,17,20', os='windows'), + job(compiler='msvc-14.2', cxxstd='14,17,20', os='windows'), + job(compiler='msvc-14.3', cxxstd='14,17,20,latest', os='windows'), + ] # from https://github.com/boostorg/boost-ci -load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx") +load("@boost_ci//ci/drone/:functions.star", "linux_cxx", "windows_cxx", "osx_cxx", "freebsd_cxx", "job_impl") diff --git a/.drone/codecov_coveralls.sh b/.drone/codecov_coveralls.sh new file mode 100644 index 0000000..1cb8314 --- /dev/null +++ b/.drone/codecov_coveralls.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Copyright 2020 Rene Rivera, Sam Darwin +# Copyright 2025 Alexander Grund +# 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 -xe + +# Run the regular Boost CI script which does the test & upload to codecov.io +wget https://github.com/boostorg/boost-ci/raw/refs/heads/master/.drone/drone.sh +. drone.sh + +# coveralls +# uses multiple lcov steps from boost-ci codecov.sh script +if [ -n "${COVERALLS_REPO_TOKEN}" ]; then + echo "processing coveralls" + pip3 install --user cpp-coveralls + cd "$BOOST_CI_SRC_FOLDER" + + export PATH=/tmp/lcov/bin:$PATH + command -v lcov + lcov --version + + lcov --remove coverage.info -o coverage_filtered.info '*/test/*' '*/extra/*' + cpp-coveralls --verbose -l coverage_filtered.info +fi diff --git a/.drone/drone.bat b/.drone/drone.bat deleted file mode 100644 index 0dc0d6c..0000000 --- a/.drone/drone.bat +++ /dev/null @@ -1,31 +0,0 @@ - -@ECHO ON -setlocal enabledelayedexpansion - -if "%DRONE_JOB_BUILDTYPE%" == "boost" ( - -echo '==================================> INSTALL' - -git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 -cp -prf boost-ci-cloned/ci . -rm -rf boost-ci-cloned -REM source ci/travis/install.sh -REM The contents of install.sh below: - -for /F %%i in ("%DRONE_REPO%") do @set SELF=%%~nxi -SET BOOST_CI_TARGET_BRANCH=%DRONE_COMMIT_BRANCH% -SET BOOST_CI_SRC_FOLDER=%cd% - -call ci\common_install.bat - -echo '==================================> COMPILE' - -REM set B2_TARGETS=libs/!SELF!/test libs/!SELF!/example -set B2_TARGETS=libs/!SELF!/test -call !BOOST_ROOT!\libs\!SELF!\ci\build.bat - -) else if "%DRONE_JOB_BUILDTYPE%" == "standalone-windows" ( - -REM not used - -) \ No newline at end of file diff --git a/.drone/drone.sh b/.drone/drone.sh deleted file mode 100755 index 0affbfd..0000000 --- a/.drone/drone.sh +++ /dev/null @@ -1,231 +0,0 @@ -#!/bin/bash - -# Copyright 2020 Rene Rivera, Sam Darwin -# 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 -xe - -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 - -common_install() { - git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 - cp -prf boost-ci-cloned/ci . - rm -rf boost-ci-cloned - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then - unset -f cd - fi - - export SELF=$(basename $REPO_NAME) - export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH" - export BOOST_CI_SRC_FOLDER=$(pwd) - - . ./ci/common_install.sh -} - -if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then - - echo '==================================> INSTALL' - - common_install - - echo '==================================> SCRIPT' - - export B2_TARGETS=${B2_TARGETS:-"libs/$SELF/test"} - $BOOST_ROOT/libs/$SELF/ci/travis/build.sh - -elif [ "$DRONE_JOB_BUILDTYPE" == "docs" ]; then - - echo '==================================> INSTALL' - - export SELF=$(basename $REPO_NAME) - - pwd - cd .. - mkdir -p $HOME/cache && cd $HOME/cache - if [ ! -d doxygen ]; then git clone -b 'Release_1_8_15' --depth 1 https://github.com/doxygen/doxygen.git && echo "not-cached"; else echo "cached"; fi - cd doxygen - cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release - cd build - sudo make install - cd ../../.. - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root --depth 1 - cd boost-root - export BOOST_ROOT=$(pwd) - git submodule update --init libs/context - git submodule update --init tools/boostbook - git submodule update --init tools/boostdep - git submodule update --init tools/docca - git submodule update --init tools/quickbook - rsync -av $TRAVIS_BUILD_DIR/ libs/$SELF - python tools/boostdep/depinst/depinst.py ../tools/quickbook - ./bootstrap.sh - ./b2 headers - - echo '==================================> SCRIPT' - - echo "using doxygen ; using boostbook ; using python : : python3 ;" >tools/build/src/user-config.jam - ./b2 -j3 libs/$SELF/doc//boostrelease - -elif [ "$DRONE_JOB_BUILDTYPE" == "codecov" ]; then - - echo '==================================> INSTALL' - - common_install - - echo '==================================> SCRIPT' - - set +e - - cd $BOOST_ROOT/libs/$SELF - ci/travis/codecov.sh - - # coveralls - # uses multiple lcov steps from boost-ci codecov.sh script - if [ -n "${COVERALLS_REPO_TOKEN}" ]; then - echo "processing coveralls" - pip3 install --user cpp-coveralls - cd $BOOST_CI_SRC_FOLDER - - export PATH=/tmp/lcov/bin:$PATH - command -v lcov - lcov --version - - lcov --remove coverage.info -o coverage_filtered.info '*/test/*' '*/extra/*' - cpp-coveralls --verbose -l coverage_filtered.info - fi - -elif [ "$DRONE_JOB_BUILDTYPE" == "valgrind" ]; then - - echo '==================================> INSTALL' - - common_install - - echo '==================================> SCRIPT' - - cd $BOOST_ROOT/libs/$SELF - ci/travis/valgrind.sh - -elif [ "$DRONE_JOB_BUILDTYPE" == "standalone" ]; then - - echo '==================================> INSTALL' - - # Installing cmake with apt-get, so not required here: - # pip install --user cmake - - echo '==================================> SCRIPT' - - export CXXFLAGS="-Wall -Wextra -Werror -std=c++17" - mkdir __build_17 - cd __build_17 - cmake -DBOOST_JSON_STANDALONE=1 .. - cmake --build . - ctest -V . - export CXXFLAGS="-Wall -Wextra -Werror -std=c++2a" - mkdir ../__build_2a - cd ../__build_2a - cmake -DBOOST_JSON_STANDALONE=1 .. - cmake --build . - ctest -V . - -elif [ "$DRONE_JOB_BUILDTYPE" == "coverity" ]; then - - echo '==================================> INSTALL' - - common_install - - echo '==================================> SCRIPT' - - if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ]; then - cd $BOOST_ROOT/libs/$SELF - ci/travis/coverity.sh - fi - -elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-superproject" ]; then - - echo '==================================> INSTALL' - - common_install - - echo '==================================> COMPILE' - - # May want to re-enable -Werror - # export CXXFLAGS="-Wall -Wextra -Werror" - export CXXFLAGS="-Wall -Wextra" - - mkdir __build_static - cd __build_static - cmake -DBOOST_ENABLE_CMAKE=1 -DBUILD_TESTING=ON -DBoost_VERBOSE=1 \ - -DBOOST_INCLUDE_LIBRARIES=$SELF .. - cmake --build . - ctest --output-on-failure -R boost_$SELF - - cd .. - - mkdir __build_shared - cd __build_shared - cmake -DBOOST_ENABLE_CMAKE=1 -DBUILD_TESTING=ON -DBoost_VERBOSE=1 \ - -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=ON .. - cmake --build . - ctest --output-on-failure -R boost_$SELF - -elif [ "$DRONE_JOB_BUILDTYPE" == "cmake1" ]; then - - echo '==================================> INSTALL' - - # https://github.com/opencv/opencv-python#frequently-asked-questions - pip install --upgrade pip - pip install --user cmake - - echo '==================================> SCRIPT' - - export SELF=$(basename $REPO_NAME) - BOOST_BRANCH=develop && [ "$DRONE_BRANCH" == "master" ] && BOOST_BRANCH=master || true - echo BOOST_BRANCH: $BOOST_BRANCH - cd .. - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - # mkdir -p libs/$SELF - # cp -r $DRONE_BUILD_DIR/* libs/$SELF - # git submodule update --init tools/boostdep - git submodule update --init --recursive - mkdir -p libs/$SELF - cp -r $DRONE_BUILD_DIR/* libs/$SELF - - # CMake tests - cd libs/$SELF - mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - cmake --build . --target install - ctest --output-on-failure - - # CMake subdir tests - cd ../test/cmake_test && mkdir __build__ && cd __build__ - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. - cmake --build . - cmake --build . --target check - ctest --output-on-failure - - # Install Library - cd ../../../../.. && mkdir __build_cmake_install_test__ && cd __build_cmake_install_test__ - cmake -DBOOST_INCLUDE_LIBRARIES=$SELF -DCMAKE_INSTALL_PREFIX=~/.local -DBoost_VERBOSE=ON -DBoost_DEBUG=ON .. - cmake --build . --target install - - # CMake install tests - cd ../libs/$SELF/test/cmake_test && mkdir __build_cmake_install_test__ && cd __build_cmake_install_test__ - cmake -DBOOST_CI_INSTALL_TEST=ON -DCMAKE_PREFIX_PATH=~/.local .. - cmake --build . - ctest --output-on-failure - -fi