diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 0000000..2a39672 --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,476 @@ +# Copyright 2022 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +local library = "multi_index"; + +local triggers = +{ + branch: [ "master", "develop", "feature/*" ] +}; + +local ubsan = { UBSAN: '1', UBSAN_OPTIONS: 'print_stacktrace=1' }; +local asan = { ASAN: '1' }; + +local linux_pipeline(name, image, environment, packages = "", sources = [], arch = "amd64") = +{ + name: name, + kind: "pipeline", + type: "docker", + trigger: triggers, + platform: + { + os: "linux", + arch: arch + }, + steps: + [ + { + name: "everything", + image: image, + environment: environment, + commands: + [ + 'set -e', + 'wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -', + ] + + (if sources != [] then [ ('apt-add-repository "' + source + '"') for source in sources ] else []) + + (if packages != "" then [ 'apt-get update', 'apt-get -y install ' + packages ] else []) + + [ + 'export LIBRARY=' + library, + './.drone/drone.sh', + ] + } + ] +}; + +local macos_pipeline(name, environment, xcode_version = "12.2", osx_version = "catalina", arch = "amd64") = +{ + name: name, + kind: "pipeline", + type: "exec", + trigger: triggers, + platform: { + "os": "darwin", + "arch": arch + }, + node: { + "os": osx_version + }, + steps: [ + { + name: "everything", + environment: environment + { "DEVELOPER_DIR": "/Applications/Xcode-" + xcode_version + ".app/Contents/Developer" }, + commands: + [ + 'export LIBRARY=' + library, + './.drone/drone.sh', + ] + } + ] +}; + +local windows_pipeline(name, image, environment, arch = "amd64") = +{ + name: name, + kind: "pipeline", + type: "docker", + trigger: triggers, + platform: + { + os: "windows", + arch: arch + }, + "steps": + [ + { + name: "everything", + image: image, + environment: environment, + commands: + [ + 'cmd /C .drone\\\\drone.bat ' + library, + ] + } + ] +}; + +[ + linux_pipeline( + "Linux 14.04 GCC 4.8* 32/64", + "cppalliance/droneubuntu1404:1", + { TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11', ADDRMD: '32,64' }, + ), + + linux_pipeline( + "Linux 14.04 GCC 4.9 32/64", + "cppalliance/droneubuntu1404:1", + { TOOLSET: 'gcc', COMPILER: 'g++-4.9', CXXSTD: '11', ADDRMD: '32,64' }, + "g++-4.9-multilib", + [ "ppa:ubuntu-toolchain-r/test" ], + ), + + linux_pipeline( + "Linux 16.04 GCC 5* 32/64", + "cppalliance/droneubuntu1604:1", + { TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14', ADDRMD: '32,64' }, + ), + + linux_pipeline( + "Linux 18.04 GCC 6 32/64", + "cppalliance/droneubuntu1804:1", + { TOOLSET: 'gcc', COMPILER: 'g++-6', CXXSTD: '11,14', ADDRMD: '32,64' }, + "g++-6-multilib", + ), + + linux_pipeline( + "Linux 18.04 GCC 7* 32/64", + "cppalliance/droneubuntu1804:1", + { TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17', ADDRMD: '32,64' }, + ), + + linux_pipeline( + "Linux 18.04 GCC 8 32/64", + "cppalliance/droneubuntu1804:1", + { TOOLSET: 'gcc', COMPILER: 'g++-8', CXXSTD: '11,14,17', ADDRMD: '32,64' }, + "g++-8-multilib", + ), + + linux_pipeline( + "Linux 20.04 GCC 9* 32/64", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17,2a', ADDRMD: '32,64' }, + ), + + linux_pipeline( + "Linux 20.04 GCC 9* ARM64", + "cppalliance/droneubuntu2004:multiarch", + { TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17,2a' }, + arch="arm64", + ), + + linux_pipeline( + "Linux 20.04 GCC 9* S390x", + "cppalliance/droneubuntu2004:multiarch", + { TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17,2a' }, + arch="s390x", + ), + + linux_pipeline( + "Linux 20.04 GCC 10 32/64", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'gcc', COMPILER: 'g++-10', CXXSTD: '11,14,17,20', ADDRMD: '32,64' }, + "g++-10-multilib", + ), + + linux_pipeline( + "Linux 22.04 GCC 11* 32/64", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'gcc', COMPILER: 'g++', CXXSTD: '11,14,17,2a', ADDRMD: '32,64' }, + ), + + linux_pipeline( + "Linux 22.04 GCC 12 32/64 C++11-14", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'gcc', COMPILER: 'g++-12', CXXSTD: '11,14', ADDRMD: '32,64' }, + "g++-12-multilib", + ), + + linux_pipeline( + "Linux 22.04 GCC 12 32/64 C++17-20", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'gcc', COMPILER: 'g++-12', CXXSTD: '17,20', ADDRMD: '32,64' }, + "g++-12-multilib", + ), + + linux_pipeline( + "Linux 22.04 GCC 12 32/64", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'gcc', COMPILER: 'g++-12', CXXSTD: '2b', ADDRMD: '32,64' }, + "g++-12-multilib", + ), + + linux_pipeline( + "Linux 23.04 GCC 13 32/64 UBSAN C++11-14", + "cppalliance/droneubuntu2304:1", + { TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '11,14', ADDRMD: '32,64' } + ubsan, + "g++-13-multilib", + ), + + linux_pipeline( + "Linux 23.04 GCC 13 32/64 UBSAN C++17-20", + "cppalliance/droneubuntu2304:1", + { TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '17,20', ADDRMD: '32,64' } + ubsan, + "g++-13-multilib", + ), + + linux_pipeline( + "Linux 23.04 GCC 13 32/64 UBSAN", + "cppalliance/droneubuntu2304:1", + { TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '2b', ADDRMD: '32,64' } + ubsan, + "g++-13-multilib", + ), + + linux_pipeline( + "Linux 23.04 GCC 13 32 ASAN C++11-14", + "cppalliance/droneubuntu2304:1", + { TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '11,14', ADDRMD: '32' } + asan, + "g++-13-multilib", + ), + + linux_pipeline( + "Linux 23.04 GCC 13 32 ASAN C++17-20", + "cppalliance/droneubuntu2304:1", + { TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '17,20', ADDRMD: '32' } + asan, + "g++-13-multilib", + ), + + linux_pipeline( + "Linux 23.04 GCC 13 32 ASAN", + "cppalliance/droneubuntu2304:1", + { TOOLSET: 'gcc', COMPILER: 'g++-13', CXXSTD: '2b', ADDRMD: '32' } + asan, + "g++-13-multilib", + ), + + linux_pipeline( + "Linux 24.04 GCC 14 UBSAN C++11-14", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '11,14' } + ubsan, + "g++-14-multilib", + ), + + linux_pipeline( + "Linux 24.04 GCC 14 UBSAN C++17-20", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '17,20' } + ubsan, + "g++-14-multilib", + ), + + linux_pipeline( + "Linux 24.04 GCC 14 UBSAN", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '2b' } + ubsan, + "g++-14-multilib", + ), + + linux_pipeline( + "Linux 24.04 GCC 14 ASAN C++11-14", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '11,14' } + asan, + "g++-14-multilib", + ), + + linux_pipeline( + "Linux 24.04 GCC 14 ASAN C++17-20", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '17,20' } + asan, + "g++-14-multilib", + ), + + linux_pipeline( + "Linux 24.04 GCC 14 ASAN", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'gcc', COMPILER: 'g++-14', CXXSTD: '2b' } + asan, + "g++-14-multilib", + ), + + linux_pipeline( + "Linux 16.04 Clang 3.5", + "cppalliance/droneubuntu1604:1", + { TOOLSET: 'clang', COMPILER: 'clang++-3.5', CXXSTD: '11' }, + "clang-3.5", + ), + + linux_pipeline( + "Linux 16.04 Clang 3.6", + "cppalliance/droneubuntu1604:1", + { TOOLSET: 'clang', COMPILER: 'clang++-3.6', CXXSTD: '11,14' }, + "clang-3.6", + ), + + linux_pipeline( + "Linux 16.04 Clang 3.7", + "cppalliance/droneubuntu1604:1", + { TOOLSET: 'clang', COMPILER: 'clang++-3.7', CXXSTD: '11,14' }, + "clang-3.7", + ), + + linux_pipeline( + "Linux 16.04 Clang 3.8", + "cppalliance/droneubuntu1604:1", + { TOOLSET: 'clang', COMPILER: 'clang++-3.8', CXXSTD: '11,14' }, + "clang-3.8", + ), + + linux_pipeline( + "Linux 18.04 Clang 3.9", + "cppalliance/droneubuntu1804:1", + { TOOLSET: 'clang', COMPILER: 'clang++-3.9', CXXSTD: '11,14' }, + "clang-3.9", + ), + + linux_pipeline( + "Linux 18.04 Clang 4.0", + "cppalliance/droneubuntu1804:1", + { TOOLSET: 'clang', COMPILER: 'clang++-4.0', CXXSTD: '11,14' }, + "clang-4.0", + ), + + linux_pipeline( + "Linux 18.04 Clang 5.0", + "cppalliance/droneubuntu1804:1", + { TOOLSET: 'clang', COMPILER: 'clang++-5.0', CXXSTD: '11,14,1z' }, + "clang-5.0", + ), + + linux_pipeline( + "Linux 18.04 Clang 6.0", + "cppalliance/droneubuntu1804:1", + { TOOLSET: 'clang', COMPILER: 'clang++-6.0', CXXSTD: '11,14,17' }, + "clang-6.0", + ), + + linux_pipeline( + "Linux 20.04 Clang 7", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'clang', COMPILER: 'clang++-7', CXXSTD: '11,14,17' }, + "clang-7", + ), + + linux_pipeline( + "Linux 20.04 Clang 8", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'clang', COMPILER: 'clang++-8', CXXSTD: '11,14,17' }, + "clang-8", + ), + + linux_pipeline( + "Linux 20.04 Clang 9", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'clang', COMPILER: 'clang++-9', CXXSTD: '11,14,17,2a' }, + "clang-9", + ), + + linux_pipeline( + "Linux 20.04 Clang 10", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'clang', COMPILER: 'clang++-10', CXXSTD: '11,14,17,2a' }, + "clang-10", + ), + + linux_pipeline( + "Linux 20.04 Clang 11", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'clang', COMPILER: 'clang++-11', CXXSTD: '11,14,17,2a' }, + "clang-11", + ), + + linux_pipeline( + "Linux 20.04 Clang 12", + "cppalliance/droneubuntu2004:1", + { TOOLSET: 'clang', COMPILER: 'clang++-12', CXXSTD: '11,14,17,2a' }, + "clang-12", + ), + + linux_pipeline( + "Linux 22.04 Clang 13", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'clang', COMPILER: 'clang++-13', CXXSTD: '11,14,17,20' }, + "clang-13", + ), + + linux_pipeline( + "Linux 22.04 Clang 14", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '11,14,17,20,2b' }, + "clang-14", + ), + + linux_pipeline( + "Linux 22.04 Clang 15", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'clang', COMPILER: 'clang++-15', CXXSTD: '11,14,17,20,2b' }, + "clang-15", + ), + + linux_pipeline( + "Linux 23.04 Clang 16", + "cppalliance/droneubuntu2304:1", + { TOOLSET: 'clang', COMPILER: 'clang++-16', CXXSTD: '11,14,17,20,2b' }, + "clang-16", + ), + + linux_pipeline( + "Linux 23.10 Clang 17 UBSAN", + "cppalliance/droneubuntu2310:1", + { TOOLSET: 'clang', COMPILER: 'clang++-17', CXXSTD: '11,14,17,20,2b' } + ubsan, + "clang-17", + ), + + linux_pipeline( + "Linux 23.10 Clang 17 ASAN", + "cppalliance/droneubuntu2310:1", + { TOOLSET: 'clang', COMPILER: 'clang++-17', CXXSTD: '11,14,17,20,2b' } + asan, + "clang-17", + ), + + linux_pipeline( + "Linux 24.04 Clang 18 UBSAN", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'clang', COMPILER: 'clang++-18', CXXSTD: '11,14,17,20,2b' } + ubsan, + "clang-18", + ), + + linux_pipeline( + "Linux 24.04 Clang 18 ASAN", + "cppalliance/droneubuntu2404:1", + { TOOLSET: 'clang', COMPILER: 'clang++-18', CXXSTD: '11,14,17,20,2b' } + asan, + "clang-18", + ), + + macos_pipeline( + "MacOS 10.15 Xcode 12.2 UBSAN", + { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,17,2a' } + ubsan, + ), + + macos_pipeline( + "MacOS 10.15 Xcode 12.2 ASAN", + { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,17,2a' } + asan, + ), + + macos_pipeline( + "MacOS 12.4 Xcode 13.4.1 UBSAN", + { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,17,20,2b', LINK: 'static' } + ubsan, + xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64", + ), + + macos_pipeline( + "MacOS 12.4 Xcode 13.4.1 ASAN", + { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,17,20,2b' } + asan, + xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64", + ), + + windows_pipeline( + "Windows VS2015 msvc-14.0", + "cppalliance/dronevs2015", + { TOOLSET: 'msvc-14.0', CXXSTD: '14,latest', B2_DONT_EMBED_MANIFEST: '1' }, + ), + + windows_pipeline( + "Windows VS2017 msvc-14.1", + "cppalliance/dronevs2017", + { TOOLSET: 'msvc-14.1', CXXSTD: '14,17,latest' }, + ), + + windows_pipeline( + "Windows VS2019 msvc-14.2", + "cppalliance/dronevs2019", + { TOOLSET: 'msvc-14.2', CXXSTD: '14,17,20,latest' }, + ), + + windows_pipeline( + "Windows VS2022 msvc-14.3", + "cppalliance/dronevs2022:1", + { TOOLSET: 'msvc-14.3', CXXSTD: '14,17,20,latest' }, + ), +] diff --git a/.drone.star b/.drone.star deleted file mode 100644 index 2347c7a..0000000 --- a/.drone.star +++ /dev/null @@ -1,47 +0,0 @@ -# Use, modification, and distribution are -# subject to the Boost Software License, Version 1.0. (See accompanying -# file LICENSE.txt) -# -# Copyright Rene Rivera 2020. - -# For Drone CI we use the Starlark scripting language to reduce duplication. -# As the yaml syntax for Drone CI is rather limited. -# -# -globalenv={} -linuxglobalimage="cppalliance/droneubuntu1404:1" -windowsglobalimage="cppalliance/dronevs2019" - -def main(ctx): - return [ - linux_cxx("TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 0", "g++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'b6589fc6ab'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x Job 1", "g++", packages="g++-4.4", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.4', 'CXXSTD': '98,0x', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x Job 2", "g++", packages="g++-4.6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.6', 'CXXSTD': '03,0x', 'DRONE_JOB_UUID': 'da4b9237ba'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 3", "g++-4.7", packages="g++-4.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.7', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 4", "g++-4.8", packages="g++-4.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.8', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '1b64538924'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 5", "g++-4.9", packages="g++-4.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-4.9', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'ac3478d69a'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 6", "g++-5", packages="g++-5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'c1dfd96eea'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 7", "g++-6", packages="g++-6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '902ba3cda1'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 8", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'DRONE_JOB_UUID': 'fe5dbbcea5'}, globalenv=globalenv), - linux_cxx("TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 Job 9", "g++-8", packages="g++-8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '0ade7c2cf9'}, globalenv=globalenv), - linux_cxx("UBSAN=1 TOOLSET=gcc COMPILER=g++-7 CXXSTD=03, Job 10", "g++-7", packages="g++-7", buildtype="boost", image=linuxglobalimage, environment={'UBSAN': '1', 'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': '03,11,14,17', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'LINKFLAGS': '-fuse-ld=gold', 'DRONE_JOB_UUID': 'b1d5781111'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 11", "clang++", packages="", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '17ba079149'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 12", "/usr/bin/clang++", packages="clang-3.3", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': '/usr/bin/clang++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': '7b52009b64'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 13", "/usr/bin/clang++", packages="clang-3.4", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': '/usr/bin/clang++', 'CXXSTD': '03,11', 'DRONE_JOB_UUID': 'bd307a3ec3'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 14", "clang++", packages="clang-3.5 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.5", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.5', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'fa35e19212'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 15", "clang++", packages="clang-3.6", llvm_os="precise", llvm_ver="3.6", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.6', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'f1abd67035'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 16", "clang++", packages="clang-3.7", llvm_os="precise", llvm_ver="3.7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.7', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '1574bddb75'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 17", "clang++-3.8", packages="clang-3.8 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.8", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.8', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '0716d9708d'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 18", "clang++-3.9", packages="clang-3.9 libstdc++-4.9-dev", llvm_os="precise", llvm_ver="3.9", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-3.9', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '9e6a55b6b4'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 19", "clang++-4.0", packages="clang-4.0", llvm_os="trusty", llvm_ver="4.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-4.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': 'b3f0c7f6bb'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 20", "clang++-5.0", packages="clang-5.0", llvm_os="trusty", llvm_ver="5.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-5.0', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '91032ad7bb'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03, Job 21", "clang++-6.0", packages="clang-6.0", llvm_os="trusty", llvm_ver="6.0", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '472b07b9fc'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11 Job 22", "clang++-7", packages="clang-7", llvm_os="trusty", llvm_ver="7", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03,11,14,17,2a', 'DRONE_JOB_UUID': '12c6fc06c9'}, globalenv=globalenv), - linux_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++-7 CXXS Job 23", "clang++-7", packages="clang-7 libstdc++-5-dev", llvm_os="trusty", llvm_ver="7", buildtype="boost", image=linuxglobalimage, environment={'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': '03,11,14,17,2a', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': 'd435a6cdd7'}, globalenv=globalenv), - linux_cxx("TOOLSET=clang COMPILER=clang++-libc++ CXXSTD= Job 24", "clang++-libc++", packages="libc++-dev", buildtype="boost", image=linuxglobalimage, environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-libc++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_UUID': '4d134bc072'}, globalenv=globalenv), - linux_cxx("UBSAN=1 TOOLSET=clang COMPILER=clang++-libc++ Job 25", "clang++-libc++", packages="libc++-dev", buildtype="boost", image=linuxglobalimage, environment={'UBSAN': '1', 'TOOLSET': 'clang', 'COMPILER': 'clang++-libc++', 'CXXSTD': '03,11,14,1z', 'UBSAN_OPTIONS': 'print_stacktrace=1', 'DRONE_JOB_UUID': 'f6e1126ced'}, globalenv=globalenv), - osx_cxx("TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 26", "clang++", packages="", buildtype="boost", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++', 'CXXSTD': '03,11,14,1z', 'DRONE_JOB_OS_NAME': 'osx', 'DRONE_JOB_UUID': '887309d048'}, globalenv=globalenv), - ] - -# from https://github.com/boostorg/boost-ci -load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx") diff --git a/.drone/after-success.sh b/.drone/after-success.sh deleted file mode 100755 index 7a693aa..0000000 --- a/.drone/after-success.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - - diff --git a/.drone/before-install.sh b/.drone/before-install.sh deleted file mode 100755 index 7a693aa..0000000 --- a/.drone/before-install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - - diff --git a/.drone/before-script.sh b/.drone/before-script.sh deleted file mode 100755 index 7a693aa..0000000 --- a/.drone/before-script.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - - diff --git a/.drone/boost.sh b/.drone/boost.sh deleted file mode 100755 index 912a32f..0000000 --- a/.drone/boost.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -set -ex -export TRAVIS_BUILD_DIR=$(pwd) -export DRONE_BUILD_DIR=$(pwd) -export TRAVIS_BRANCH=$DRONE_BRANCH -export VCS_COMMIT_ID=$DRONE_COMMIT -export GIT_COMMIT=$DRONE_COMMIT -export PATH=~/.local/bin:/usr/local/bin:$PATH - -echo '==================================> BEFORE_INSTALL' - -. .drone/before-install.sh - -echo '==================================> INSTALL' - -cd .. -git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root -cd boost-root -git submodule update --init -git rm --ignore-unmatch libs/multi_index/ -./bootstrap.sh -./b2 headers -mkdir libs/multi_index -cp -r $TRAVIS_BUILD_DIR/* libs/multi_index - -echo '==================================> BEFORE_SCRIPT' - -. $DRONE_BUILD_DIR/.drone/before-script.sh - -echo '==================================> SCRIPT' - -echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam -./b2 libs/multi_index/test toolset=$TOOLSET cxxstd=$CXXSTD - -echo '==================================> AFTER_SUCCESS' - -. $DRONE_BUILD_DIR/.drone/after-success.sh diff --git a/.drone/drone.bat b/.drone/drone.bat new file mode 100644 index 0000000..f06b052 --- /dev/null +++ b/.drone/drone.bat @@ -0,0 +1,23 @@ +@REM Copyright 2022 Peter Dimov +@REM Distributed under the Boost Software License, Version 1.0. +@REM https://www.boost.org/LICENSE_1_0.txt + +@ECHO ON + +set LIBRARY=%1 +set DRONE_BUILD_DIR=%CD% + +set BOOST_BRANCH=develop +if "%DRONE_BRANCH%" == "master" set BOOST_BRANCH=master +cd .. +git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root +cd boost-root +git submodule update --init tools/boostdep +xcopy /s /e /q %DRONE_BUILD_DIR% libs\%LIBRARY%\ +python tools/boostdep/depinst/depinst.py -I examples %LIBRARY% +cmd /c bootstrap +b2 -d0 headers + +if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% +if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD% +b2 -j3 libs/%LIBRARY%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker diff --git a/.drone/drone.sh b/.drone/drone.sh new file mode 100755 index 0000000..1268a75 --- /dev/null +++ b/.drone/drone.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Copyright 2022 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# https://www.boost.org/LICENSE_1_0.txt + +set -ex +export PATH=~/.local/bin:/usr/local/bin:$PATH + +DRONE_BUILD_DIR=$(pwd) + +BOOST_BRANCH=develop +if [ "$DRONE_BRANCH" = "master" ]; then BOOST_BRANCH=master; fi + +cd .. +git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root +cd boost-root +git submodule update --init tools/boostdep +cp -r $DRONE_BUILD_DIR/* libs/$LIBRARY +python tools/boostdep/depinst/depinst.py -I examples $LIBRARY +./bootstrap.sh +./b2 -d0 headers + +echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam +./b2 -j3 libs/$LIBRARY/test toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${UBSAN:+undefined-sanitizer=norecover debug-symbols=on} ${ASAN:+address-sanitizer=norecover debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS} ${LINK:+link=$LINK} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 958b128..abcf51b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: GitHub Actions CI +name: CI on: pull_request: @@ -6,10 +6,10 @@ on: branches: - master - develop - - githubactions* - feature/** - - fix/** - - pr/** + +env: + UBSAN_OPTIONS: print_stacktrace=1 jobs: posix: @@ -17,527 +17,276 @@ jobs: fail-fast: false matrix: include: - - name: "TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 Job 0" - buildtype: "boost" - packages: "" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98,0x Job 1" - buildtype: "boost" - packages: "g++-4.4" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.4" - cxxstd: "98,0x" - - name: "TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x Job 2" - buildtype: "boost" - packages: "g++-4.6" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.6" - cxxstd: "03,0x" - - name: "TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 Job 3" - buildtype: "boost" - packages: "g++-4.7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "g++-4.7" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.7" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 Job 4" - buildtype: "boost" - packages: "g++-4.8" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "g++-4.8" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.8" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 Job 5" - buildtype: "boost" - packages: "g++-4.9" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-4.9" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-4.9" - cxxstd: "03,11" - - name: "TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z Job 6" - buildtype: "boost" - packages: "g++-5" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-5" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-5" - cxxstd: "03,11,14,1z" - - name: "TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z Job 7" - buildtype: "boost" - packages: "g++-6" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "g++-6" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-6" - cxxstd: "03,11,14,1z" - - name: "TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 Job 8" - buildtype: "boost" - packages: "g++-7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-7" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-7" - cxxstd: "03,11,14,17" - - name: "TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 Job 9" - buildtype: "boost" - packages: "g++-8" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-8" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "gcc" - compiler: "g++-8" - cxxstd: "03,11,14,17,2a" - - name: "UBSAN=1 TOOLSET=gcc COMPILER=g++-7 CXXSTD=03, Job 10" - buildtype: "boost" - packages: "g++-7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "g++-7" - sources: "" - llvm_os: "" - llvm_ver: "" - ubsan: "1" - toolset: "gcc" - compiler: "g++-7" - cxxstd: "03,11,14,17" - ubsan_options: "print_stacktrace=1" - linkflags: "-fuse-ld=gold" - - name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 Job 11" - buildtype: "boost" - packages: "" - packages_to_remove: "" - os: "ubuntu-18.04" - cxx: "clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "clang++" - cxxstd: "03,11" - - name: "TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 12" - buildtype: "boost" - packages: "clang-3.3" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "/usr/bin/clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "/usr/bin/clang++" - cxxstd: "03,11" - - name: "TOOLSET=clang COMPILER=/usr/bin/clang++ CXXST Job 13" - buildtype: "boost" - packages: "clang-3.4" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "/usr/bin/clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - toolset: "clang" - compiler: "/usr/bin/clang++" - cxxstd: "03,11" - - name: "TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03, Job 14" - buildtype: "boost" - packages: "clang-3.5 libstdc++-4.9-dev" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-3.5" - sources: "" - llvm_os: "precise" - llvm_ver: "3.5" - toolset: "clang" - compiler: "clang++-3.5" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03, Job 15" - buildtype: "boost" - packages: "clang-3.6" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-3.6" - sources: "" - llvm_os: "precise" - llvm_ver: "3.6" - toolset: "clang" - compiler: "clang++-3.6" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03, Job 16" - buildtype: "boost" - packages: "clang-3.7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-3.7" - sources: "" - llvm_os: "precise" - llvm_ver: "3.7" - toolset: "clang" - compiler: "clang++-3.7" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03, Job 17" - buildtype: "boost" - packages: "clang-3.8 libstdc++-4.9-dev" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-3.8" - sources: "" - llvm_os: "precise" - llvm_ver: "3.8" - toolset: "clang" - compiler: "clang++-3.8" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03, Job 18" - buildtype: "boost" - packages: "clang-3.9 libstdc++-4.9-dev" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-3.9" - sources: "" - llvm_os: "precise" - llvm_ver: "3.9" - toolset: "clang" - compiler: "clang++-3.9" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03, Job 19" - buildtype: "boost" - packages: "clang-4.0" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-4.0" - sources: "" - llvm_os: "trusty" - llvm_ver: "4.0" - toolset: "clang" - compiler: "clang++-4.0" - cxxstd: "03,11,14" - - name: "TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03, Job 20" - buildtype: "boost" - packages: "clang-5.0" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-5.0" - sources: "" - llvm_os: "trusty" - llvm_ver: "5.0" - toolset: "clang" - compiler: "clang++-5.0" - cxxstd: "03,11,14,1z" - - name: "TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03, Job 21" - buildtype: "boost" - packages: "clang-6.0" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:14.04" - cxx: "clang++-6.0" - sources: "" - llvm_os: "trusty" - llvm_ver: "6.0" - toolset: "clang" - compiler: "clang++-6.0" - cxxstd: "03,11,14,17,2a" - - name: "TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11 Job 22" - buildtype: "boost" - packages: "clang-7" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-7" - sources: "" - llvm_os: "xenial" - llvm_ver: "7" - toolset: "clang" - compiler: "clang++-7" - cxxstd: "03,11,14,17,2a" - - name: "UBSAN=1 TOOLSET=clang COMPILER=clang++-7 CXXS Job 23" - buildtype: "boost" - packages: "clang-7 libstdc++-5-dev" - packages_to_remove: "" - os: "ubuntu-20.04" - container: "ubuntu:16.04" - cxx: "clang++-7" - sources: "" - llvm_os: "xenial" - llvm_ver: "7" - ubsan: "1" - toolset: "clang" - compiler: "clang++-7" - cxxstd: "03,11,14,17,2a" - ubsan_options: "print_stacktrace=1" - - name: "TOOLSET=clang COMPILER=clang++-libc++ CXXSTD= Job 24" - buildtype: "boost" - packages: " libc++-9-dev libc++abi-9-dev" - packages_to_remove: "libc++-dev libc++abi-dev" - os: "ubuntu-18.04" - cxx: "clang++-libc++" - sources: "" - llvm_os: "xenial" - llvm_ver: "9" - toolset: "clang" - compiler: "clang++-libc++" - cxxstd: "03,11,14,1z" - - name: "UBSAN=1 TOOLSET=clang COMPILER=clang++-libc++ Job 25" - buildtype: "boost" - packages: " libc++-9-dev libc++abi-9-dev" - packages_to_remove: "libc++-dev libc++abi-dev" - os: "ubuntu-18.04" - cxx: "clang++-libc++" - sources: "" - llvm_os: "xenial" - llvm_ver: "9" - ubsan: "1" - toolset: "clang" - compiler: "clang++-libc++" - cxxstd: "03,11,14,1z" - ubsan_options: "print_stacktrace=1" + - toolset: gcc-4.8 + cxxstd: "11" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-4.8-multilib + address-model: 32,64 + - toolset: gcc-5 + cxxstd: "11,14,1z" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-5-multilib + address-model: 32,64 + - toolset: gcc-6 + cxxstd: "11,14,1z" + container: ubuntu:18.04 + os: ubuntu-latest + install: g++-6-multilib + address-model: 32,64 + - toolset: gcc-7 + cxxstd: "11,14,17" + os: ubuntu-20.04 + install: g++-7-multilib + address-model: 32,64 + - toolset: gcc-8 + cxxstd: "11,14,17,2a" + os: ubuntu-20.04 + install: g++-8-multilib + address-model: 32,64 + - toolset: gcc-9 + cxxstd: "11,14,17,2a" + os: ubuntu-20.04 + install: g++-9-multilib + address-model: 32,64 + - toolset: gcc-10 + cxxstd: "11,14,17,2a" + os: ubuntu-22.04 + install: g++-10-multilib + address-model: 32,64 + - toolset: gcc-11 + cxxstd: "11,14,17,20" + os: ubuntu-22.04 + install: g++-11-multilib + address-model: 32,64 + - toolset: gcc-12 + cxxstd: "11,14,17,20,2b" + os: ubuntu-22.04 + install: g++-12-multilib + address-model: 32,64 + - toolset: gcc-13 + cxxstd: "11,14,17,20,2b" + os: ubuntu-24.04 + install: g++-13-multilib + address-model: 32,64 + - toolset: gcc-14 + cxxstd: "11,14,17,20,2b" + os: ubuntu-24.04 + install: g++-14-multilib + address-model: 32,64 + - toolset: clang + compiler: clang++-3.9 + cxxstd: "11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-3.9 + - toolset: clang + compiler: clang++-4.0 + cxxstd: "11,14" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-4.0 + - toolset: clang + compiler: clang++-5.0 + cxxstd: "11,14,1z" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-5.0 + - toolset: clang + compiler: clang++-6.0 + cxxstd: "11,14,17" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-6.0 + - toolset: clang + compiler: clang++-7 + cxxstd: "11,14,17" + os: ubuntu-latest + container: ubuntu:18.04 + install: clang-7 + - toolset: clang + compiler: clang++-8 + cxxstd: "11,14,17" + os: ubuntu-20.04 + install: clang-8 + - toolset: clang + compiler: clang++-9 + cxxstd: "11,14,17,2a" + os: ubuntu-20.04 + install: clang-9 + - toolset: clang + compiler: clang++-10 + cxxstd: "11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-11 + cxxstd: "11,14,17,2a" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-12 + cxxstd: "11,14,17,20" + os: ubuntu-20.04 + - toolset: clang + compiler: clang++-13 + cxxstd: "11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-13 + - toolset: clang + compiler: clang++-14 + cxxstd: "11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-14 + - toolset: clang + compiler: clang++-15 + cxxstd: "11,14,17,20,2b" + container: ubuntu:22.04 + os: ubuntu-latest + install: clang-15 + - toolset: clang + compiler: clang++-16 + cxxstd: "11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-16 + - toolset: clang + compiler: clang++-17 + cxxstd: "11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-17 + - toolset: clang + compiler: clang++-18 + cxxstd: "11,14,17,20,2b" + container: ubuntu:24.04 + os: ubuntu-latest + install: clang-18 + - toolset: clang + cxxstd: "11,14,17,20,2b" + os: macos-12 + - toolset: clang + cxxstd: "11,14,17,20,2b" + os: macos-13 + - toolset: clang + cxxstd: "11,14,17,20,2b" + os: macos-14 - runs-on: ${{ matrix.os }} - container: ${{ matrix.container }} + runs-on: ${{matrix.os}} + container: ${{matrix.container}} + + defaults: + run: + shell: bash steps: - - name: Check if running in container - if: matrix.container != '' - run: echo "GHA_CONTAINER=${{ matrix.container }}" >> $GITHUB_ENV - - name: If running in container, upgrade packages - if: matrix.container != '' + - name: Enable Node 16 run: | - apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget curl apt-transport-https make apt-file sudo unzip libssl-dev build-essential autotools-dev autoconf automake g++ libc++-helpers python ruby cpio gcc-multilib g++-multilib pkgconf python3 ccache libpython-dev - sudo apt-add-repository ppa:git-core/ppa - sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git - python_version=$(python3 -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))') - sudo wget https://bootstrap.pypa.io/pip/$python_version/get-pip.py - sudo python3 get-pip.py - sudo /usr/local/bin/pip install cmake + echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: linux - shell: bash - env: - CXX: ${{ matrix.cxx }} - SOURCES: ${{ matrix.sources }} - LLVM_OS: ${{ matrix.llvm_os }} - LLVM_VER: ${{ matrix.llvm_ver }} - PACKAGES: ${{ matrix.packages }} - PACKAGES_TO_REMOVE: ${{ matrix.packages_to_remove }} - JOB_BUILDTYPE: ${{ matrix.buildtype }} - TOOLSET: ${{ matrix.toolset }} - COMPILER: ${{ matrix.compiler }} - CXXSTD: ${{ matrix.cxxstd }} - UBSAN: ${{ matrix.ubsan }} - UBSAN_OPTIONS: ${{ matrix.ubsan_options }} - LINKFLAGS: ${{ matrix.linkflags }} - TRAVIS_BRANCH: ${{ github.base_ref }} - TRAVIS_OS_NAME: "linux" + - name: Setup container environment + if: matrix.container run: | - echo '==================================> SETUP' - echo '==================================> PACKAGES' - set -e - if [ -n "$PACKAGES_TO_REMOVE" ]; then sudo apt-get purge -y $PACKAGES_TO_REMOVE; fi - echo ">>>>> APT: REPO.." - for i in {1..3}; do sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" && break || sleep 2; done - - if test -n "${LLVM_OS}" ; then - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - if test -n "${LLVM_VER}" ; then - sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS}-${LLVM_VER} main" - else - # Snapshot (i.e. trunk) build of clang - sudo -E apt-add-repository "deb http://apt.llvm.org/${LLVM_OS}/ llvm-toolchain-${LLVM_OS} main" - fi - fi - echo ">>>>> APT: UPDATE.." - sudo -E apt-get -o Acquire::Retries=3 update - if test -n "${SOURCES}" ; then - echo ">>>>> APT: INSTALL SOURCES.." - for SOURCE in $SOURCES; do - sudo -E apt-add-repository ppa:$SOURCE - done - fi - echo ">>>>> APT: INSTALL ${PACKAGES}.." - sudo -E DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=3 -y --no-install-suggests --no-install-recommends install ${PACKAGES} + apt-get update + apt-get -y install sudo python3 git g++ - echo '==================================> INSTALL AND COMPILE' - set -e - export TRAVIS_BUILD_DIR=$(pwd) - export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')} - export VCS_COMMIT_ID=$GITHUB_SHA - export GIT_COMMIT=$GITHUB_SHA - export REPO_NAME=$(basename $GITHUB_REPOSITORY) - export USER=$(whoami) - export CC=${CC:-gcc} - export PATH=~/.local/bin:/usr/local/bin:$PATH - - if [ "$JOB_BUILDTYPE" == "boost" ]; then - - echo '==================================> INSTALL' + - name: Install packages + if: matrix.install + run: | + sudo apt-get update + sudo apt-get -y install ${{matrix.install}} + - name: Setup Boost + run: | + echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY + LIBRARY=${GITHUB_REPOSITORY#*/} + echo LIBRARY: $LIBRARY + echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV + echo GITHUB_BASE_REF: $GITHUB_BASE_REF + echo GITHUB_REF: $GITHUB_REF + REF=${GITHUB_BASE_REF:-$GITHUB_REF} + REF=${REF#refs/heads/} + echo REF: $REF + BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true + echo BOOST_BRANCH: $BOOST_BRANCH cd .. - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root - git submodule update --init - git rm --ignore-unmatch libs/multi_index/ + cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + git submodule update --init tools/boostdep + python3 tools/boostdep/depinst/depinst.py -I example --git_args "--jobs 3" $LIBRARY ./bootstrap.sh - ./b2 headers - mkdir libs/multi_index - cp -r $TRAVIS_BUILD_DIR/* libs/multi_index + ./b2 -d0 headers - echo '==================================> SCRIPT' + - name: Create user-config.jam + if: matrix.compiler + run: | + echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam - echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam - ./b2 libs/multi_index/test toolset=$TOOLSET cxxstd=$CXXSTD + - name: Run tests + run: | + cd ../boost-root + export ADDRMD=${{matrix.address-model}} + ./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} ${ADDRMD:+address-model=$ADDRMD} variant=debug,release - fi - osx: + windows: strategy: fail-fast: false matrix: include: - - name: "TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,1 Job 26" - buildtype: "boost" - packages: "" - os: "macos-11" - cxx: "clang++" - sources: "" - llvm_os: "" - llvm_ver: "" - xcode_version: 11.7 - toolset: "clang" - compiler: "clang++" - cxxstd: "03,11,14,1z" + - toolset: msvc-14.0 + cxxstd: 14,latest + addrmd: 32,64 + os: windows-2019 + - toolset: msvc-14.2 + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2019 + - toolset: msvc-14.3 + cxxstd: "14,17,20,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: clang-win + cxxstd: "14,17,latest" + addrmd: 32,64 + os: windows-2022 + - toolset: gcc + cxxstd: "11,14,17,2a" + addrmd: 64 + os: windows-2019 - runs-on: ${{ matrix.os }} + runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set DEVELOPER_DIR - if: matrix.xcode_version != '' - run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer" >> $GITHUB_ENV - - name: Test DEVELOPER_DIR - run: echo $DEVELOPER_DIR - - - name: "osx" - shell: bash - env: - CXX: ${{ matrix.cxx }} - SOURCES: ${{ matrix.sources }} - LLVM_OS: ${{ matrix.llvm_os }} - LLVM_VER: ${{ matrix.llvm_ver }} - PACKAGES: ${{ matrix.packages }} - JOB_BUILDTYPE: ${{ matrix.buildtype }} - TOOLSET: ${{ matrix.toolset }} - COMPILER: ${{ matrix.compiler }} - CXXSTD: ${{ matrix.cxxstd }} - UBSAN: ${{ matrix.ubsan }} - UBSAN_OPTIONS: ${{ matrix.ubsan_options }} - LINKFLAGS: ${{ matrix.linkflags }} - TRAVIS_BRANCH: ${{ github.base_ref }} - TRAVIS_OS_NAME: "osx" + - name: Setup Boost + shell: cmd run: | - echo '==================================> SETUP' - set -e - sudo mv /Library/Developer/CommandLineTools /Library/Developer/CommandLineTools.bck - echo '==================================> PACKAGES' - echo '==================================> INSTALL AND COMPILE' - set -e - export TRAVIS_BUILD_DIR=$(pwd) - export TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')} - export VCS_COMMIT_ID=$GITHUB_SHA - export GIT_COMMIT=$GITHUB_SHA - export REPO_NAME=$(basename $GITHUB_REPOSITORY) - export USER=$(whoami) - export CC=${CC:-gcc} - export PATH=~/.local/bin:/usr/local/bin:$PATH - - if [ "$JOB_BUILDTYPE" == "boost" ]; then - - echo '==================================> INSTALL' - + echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY% + for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi + echo LIBRARY: %LIBRARY% + echo LIBRARY=%LIBRARY%>>%GITHUB_ENV% + echo GITHUB_BASE_REF: %GITHUB_BASE_REF% + echo GITHUB_REF: %GITHUB_REF% + if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF% + set BOOST_BRANCH=develop + for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master + echo BOOST_BRANCH: %BOOST_BRANCH% cd .. - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root cd boost-root - git submodule update --init - git rm --ignore-unmatch libs/multi_index/ - ./bootstrap.sh - ./b2 headers - mkdir libs/multi_index - cp -r $TRAVIS_BUILD_DIR/* libs/multi_index + xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\ + git submodule update --init tools/boostdep + python tools/boostdep/depinst/depinst.py -I example --git_args "--jobs 3" %LIBRARY% + cmd /c bootstrap + b2 -d0 headers - echo '==================================> SCRIPT' - - echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam - ./b2 libs/multi_index/test toolset=$TOOLSET cxxstd=$CXXSTD - - fi + - name: Run tests + shell: cmd + run: | + cd ../boost-root + b2 -j3 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker diff --git a/README.md b/README.md index 60038d7..c18c41e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,48 @@ # Boost Multi-index Containers Library -Branch | Travis | Drone | GitHub Actions | AppVeyor | Regression tests ----------|--------|-------|----------------|----------|----------------- -develop | [![Build Status](https://travis-ci.com/boostorg/multi_index.svg?branch=develop)](https://travis-ci.com/boostorg/multi_index) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/multi_index/status.svg?ref=refs/heads/develop)](https://drone.cpp.al/boostorg/multi_index) | [![Build Status](https://github.com/boostorg/multi_index/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/multi_index/actions/workflows/ci.yml?query=branch:develop) | [![Build Status](https://ci.appveyor.com/api/projects/status/github/boostorg/multi_index?branch=develop&svg=true)](https://ci.appveyor.com/project/joaquintides/multi-index) | [![Test Results](./test_results.svg)](https://www.boost.org/development/tests/develop/developer/multi_index.html) -master | [![Build Status](https://travis-ci.com/boostorg/multi_index.svg?branch=master)](https://travis-ci.com/boostorg/multi_index) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/multi_index/status.svg?ref=refs/heads/master)](https://drone.cpp.al/boostorg/multi_index) | [![Build Status](https://github.com/boostorg/multi_index/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/multi_index/actions/workflows/ci.yml?query=branch:master) | [![Build Status](https://ci.appveyor.com/api/projects/status/github/boostorg/multi_index?branch=master&svg=true)](https://ci.appveyor.com/project/joaquintides/multi-index) | [![Test Results](./test_results.svg)](https://www.boost.org/development/tests/master/developer/multi_index.html) +[![Branch](https://img.shields.io/badge/branch-master-brightgreen.svg)](https://github.com/boostorg/multi_index/tree/master) [![CI](https://github.com/boostorg/multi_index/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/multi_index/actions/workflows/ci.yml) [![Drone status](https://img.shields.io/drone/build/boostorg/multi_index/master?server=https%3A%2F%2Fdrone.cpp.al&logo=drone&logoColor=%23CCCCCC&label=CI)](https://drone.cpp.al/boostorg/multi_index) [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/multi_index.html) [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/multi_index) [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/multi_index.html)
+[![Branch](https://img.shields.io/badge/branch-develop-brightgreen.svg)](https://github.com/boostorg/multi_index/tree/develop) [![CI](https://github.com/boostorg/multi_index/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/multi_index/actions/workflows/ci.yml) [![Drone status](https://img.shields.io/drone/build/boostorg/multi_index/develop?server=https%3A%2F%2Fdrone.cpp.al&logo=drone&logoColor=%23CCCCCC&label=CI)](https://drone.cpp.al/boostorg/multi_index) [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/multi_index.html) [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/multi_index) [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/multi_index.html)
+[![BSL 1.0](https://img.shields.io/badge/license-BSL_1.0-blue.svg)](https://www.boost.org/users/license.html) Header-only library [Boost.MultiIndex](http://boost.org/libs/multi_index) provides a class template named `multi_index_container` which enables the construction of containers maintaining one or more indices with different sorting and access semantics. + +## Learn about Boost.MultiIndex + +* [Online documentation](https://boost.org/libs/multi_index) + +## Install Boost.MultiIndex + +* [Download Boost](https://www.boost.org/users/download/) and you're ready to go (this is a header-only library requiring no building). +* Using Conan 2: In case you don't have it yet, add an entry for Boost in your `conanfile.txt` (the example requires at least Boost 1.86): +``` +[requires] +boost/[>=1.86.0] +``` + + +``` +[options] +boost:header_only=True +``` +* Using vcpkg: Execute the command +``` +vcpkg install boost-multi-index +``` +* Using CMake: [Boost CMake support infrastructure](https://github.com/boostorg/cmake) +allows you to use CMake directly to download, build and consume all of Boost or +some specific libraries. + +## Support + +* Join the **#boost** discussion group at [cpplang.slack.com](https://cpplang.slack.com/) +([ask for an invite](https://cppalliance.org/slack/) if you’re not a member of this workspace yet) +* Ask in the [Boost Users mailing list](https://lists.boost.org/mailman/listinfo.cgi/boost-users) +(add the `[multi_index]` tag at the beginning of the subject line) +* [File an issue](https://github.com/boostorg/multi_index/issues) + +## Contribute + +* [Pull requests](https://github.com/boostorg/multi_index/pulls) against **develop** branch are most welcome. +Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). diff --git a/include/boost/multi_index/detail/safe_mode.hpp b/include/boost/multi_index/detail/safe_mode.hpp index b3fed3d..08de2f4 100644 --- a/include/boost/multi_index/detail/safe_mode.hpp +++ b/include/boost/multi_index/detail/safe_mode.hpp @@ -119,7 +119,7 @@ #include /* keep it first to prevent nasty warns in MSVC */ #include #include - #include +#include #include #include #include @@ -131,7 +131,7 @@ #endif #if defined(BOOST_HAS_THREADS) -#include +#include #include #endif