From 1070c9b69e1bc9d3492dd9e760411d12583cdb76 Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Wed, 22 Mar 2023 15:11:55 -0700 Subject: [PATCH] Attempt to add tsan to Drone CI --- .drone.jsonnet | 21 +++++++++++++++++++++ .drone/drone.sh | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 51340c4c..447bf3f2 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -11,6 +11,7 @@ local triggers = local ubsan = { UBSAN: '1', UBSAN_OPTIONS: 'print_stacktrace=1' }; local asan = { ASAN: '1' }; +local tsan = { TSAN: '1' }; local linux_pipeline(name, image, environment, packages = "", sources = [], arch = "amd64") = { @@ -224,6 +225,13 @@ local windows_pipeline(name, image, environment, arch = "amd64") = "g++-12-multilib", ), + linux_pipeline( + "Linux 22.04 GCC 12 64 TSAN (11,14,17,20,2b)", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'gcc', COMPILER: 'g++-12', CXXSTD: '11,14,17,20,2b', ADDRMD: '64', TARGET: 'libs/unordered/test//cfoa_tests' } + tsan, + "g++-12-multilib", + ), + linux_pipeline( "Linux 16.04 Clang 3.5", "cppalliance/droneubuntu1604:1", @@ -343,6 +351,13 @@ local windows_pipeline(name, image, environment, arch = "amd64") = "clang-14", ), + linux_pipeline( + "Linux 22.04 Clang 14 libc++ 64 TSAN", + "cppalliance/droneubuntu2204:1", + { TOOLSET: 'clang', COMPILER: 'clang++-14', ADDRMD: '64', TARGET: 'libs/unordered/test//cfoa_tests', CXXSTD: '11,14,17,20', STDLIB: libc++ } + tsan, + "clang-14 libc++-14-dev libc++abi-14-dev", + ), + linux_pipeline( "Linux 22.04 Clang 15", "cppalliance/droneubuntu2204:1", @@ -362,6 +377,12 @@ local windows_pipeline(name, image, environment, arch = "amd64") = xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64", ), + macos_pipeline( + "MacOS 12.4 Xcode 13.4.1 TSAN", + { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '11,14,1z', TARGET: 'libs/unordered/test//cfoa_tests' } + tsan, + xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64", + ), + windows_pipeline( "Windows VS2015 msvc-14.0", "cppalliance/dronevs2015", diff --git a/.drone/drone.sh b/.drone/drone.sh index 2f2125df..b892890d 100755 --- a/.drone/drone.sh +++ b/.drone/drone.sh @@ -7,6 +7,8 @@ set -ex export PATH=~/.local/bin:/usr/local/bin:$PATH +: ${TARGET:="libs/$LIBRARY/test"} + DRONE_BUILD_DIR=$(pwd) BOOST_BRANCH=develop @@ -22,4 +24,4 @@ python tools/boostdep/depinst/depinst.py $LIBRARY ./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} +./b2 -j3 $TARGET toolset=$TOOLSET cxxstd=$CXXSTD variant=debug,release ${ADDRMD:+address-model=$ADDRMD} ${STDLIB:+$STDLIB} ${UBSAN:+undefined-sanitizer=norecover debug-symbols=on} ${ASAN:+address-sanitizer=norecover debug-symbols=on} ${TSAN:+thread-sanitizer=norecover debug-symbols=on} ${LINKFLAGS:+linkflags=$LINKFLAGS}