diff --git a/.drone.star b/.drone.star index 331689b2e..23807568c 100644 --- a/.drone.star +++ b/.drone.star @@ -26,6 +26,7 @@ def _b2_command( address_model='64', server_host='127.0.0.1', separate_compilation=1, + use_ts_executor=0, address_sanitizer=0, undefined_sanitizer=0 ): @@ -40,6 +41,7 @@ def _b2_command( '--address-model={} '.format(address_model) + \ '--server-host={} '.format(server_host) + \ '--separate-compilation={} '.format(separate_compilation) + \ + '--use-ts-executor={} '.format(use_ts_executor) + \ '--address-sanitizer={} '.format(address_sanitizer) + \ '--undefined-sanitizer={} '.format(undefined_sanitizer) @@ -135,6 +137,7 @@ def linux_b2( stdlib='native', address_model='64', separate_compilation=1, + use_ts_executor = 0, address_sanitizer=0, undefined_sanitizer=0, arch='amd64', @@ -148,6 +151,7 @@ def linux_b2( address_model=address_model, server_host='mysql', separate_compilation=separate_compilation, + use_ts_executor=use_ts_executor, address_sanitizer=address_sanitizer, undefined_sanitizer=undefined_sanitizer ) @@ -167,7 +171,8 @@ def windows_b2( toolset, cxxstd, variant, - address_model = '64' + address_model = '64', + use_ts_executor = 0 ): command = _b2_command( source_dir='$Env:DRONE_WORKSPACE', @@ -175,7 +180,8 @@ def windows_b2( cxxstd=cxxstd, variant=variant, address_model=address_model, - server_host='127.0.0.1' + server_host='127.0.0.1', + use_ts_executor=use_ts_executor ) return _pipeline(name=name, image=image, os='windows', command=command, db=None) @@ -265,6 +271,7 @@ def main(ctx): linux_b2('Linux B2 clang-16-sanit', _image('build-clang16'), toolset='clang-16', cxxstd='20', address_sanitizer=1, undefined_sanitizer=1), linux_b2('Linux B2 clang-16-i386-sanit', _image('build-clang16-i386'), toolset='clang-16', cxxstd='20', address_model=32, address_sanitizer=1, undefined_sanitizer=1), linux_b2('Linux B2 gcc-5', _image('build-gcc5'), toolset='gcc-5', cxxstd='11'), # gcc-5 C++14 doesn't like my constexpr field_view + linux_b2('Linux B2 gcc-5-ts-executor', _image('build-gcc5'), toolset='gcc-5', cxxstd='11', use_ts_executor=1), linux_b2('Linux B2 gcc-6', _image('build-gcc6'), toolset='gcc-6', cxxstd='14,17'), linux_b2('Linux B2 gcc-10', _image('build-gcc10'), toolset='gcc-10', cxxstd='17,20'), linux_b2('Linux B2 gcc-11', _image('build-gcc11'), toolset='gcc-11', cxxstd='20'), @@ -274,10 +281,11 @@ def main(ctx): linux_b2('Linux B2 gcc-13-sanit', _image('build-gcc13'), toolset='gcc-13', cxxstd='20', variant='debug', address_sanitizer=1, undefined_sanitizer=1), # B2 Windows - windows_b2('Windows B2 msvc14.1 32-bit', _win_image('build-msvc14_1'), toolset='msvc-14.1', cxxstd='11,14,17', variant='release', address_model='32'), - windows_b2('Windows B2 msvc14.1 64-bit', _win_image('build-msvc14_1'), toolset='msvc-14.1', cxxstd='14,17', variant='release', address_model='64'), - windows_b2('Windows B2 msvc14.2', _win_image('build-msvc14_2'), toolset='msvc-14.2', cxxstd='14,17', variant='release', address_model='64'), - windows_b2('Windows B2 msvc14.3', _win_image('build-msvc14_3'), toolset='msvc-14.3', cxxstd='17,20', variant='debug,release', address_model='64'), + windows_b2('Windows B2 msvc14.1 32-bit', _win_image('build-msvc14_1'), toolset='msvc-14.1', cxxstd='11,14,17', variant='release', address_model='32'), + windows_b2('Windows B2 msvc14.1 64-bit', _win_image('build-msvc14_1'), toolset='msvc-14.1', cxxstd='14,17', variant='release'), + windows_b2('Windows B2 msvc14.2', _win_image('build-msvc14_2'), toolset='msvc-14.2', cxxstd='14,17', variant='release'), + windows_b2('Windows B2 msvc14.3', _win_image('build-msvc14_3'), toolset='msvc-14.3', cxxstd='17,20', variant='debug,release'), + windows_b2('Windows B2 msvc14.3-ts-executor', _win_image('build-msvc14_3'), toolset='msvc-14.3', cxxstd='20', variant='release', use_ts_executor=1), # Docs docs() diff --git a/test/Jamfile b/test/Jamfile index c8800ee0b..41845657f 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -15,6 +15,9 @@ project /boost/mysql/test ; # Support header-only builds feature.feature boost.mysql.separate-compilation : on off : propagated composite ; +# Support builds with BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT +feature.feature boost.mysql.use-ts-executor : on off : propagated composite ; + # System libraries if [ os.name ] = NT { @@ -99,6 +102,7 @@ local requirements = windows:_WIN32_WINNT=0x0601 BOOST_ASIO_SEPARATE_COMPILATION ../include + on:BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT ; alias boost_mysql diff --git a/tools/ci.py b/tools/ci.py index 937c51c95..779a5b69c 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -185,6 +185,7 @@ def _b2_build( separate_compilation: bool = True, address_sanitizer: bool = False, undefined_sanitizer: bool = False, + use_ts_executor: bool = False, ) -> None: # Config os.environ['UBSAN_OPTIONS'] = 'print_stacktrace=1' @@ -212,6 +213,7 @@ def _b2_build( 'variant={}'.format(variant), 'stdlib={}'.format(stdlib), 'boost.mysql.separate-compilation={}'.format('on' if separate_compilation else 'off'), + 'boost.mysql.use-ts-executor={}'.format('on' if use_ts_executor else 'off'), ] + (['address-sanitizer=norecover'] if address_sanitizer else []) # can only be disabled by omitting the arg + (['undefined-sanitizer=norecover'] if undefined_sanitizer else []) # can only be disabled by omitting the arg + [ @@ -511,6 +513,7 @@ def main(): parser.add_argument('--stdlib', choices=['native', 'libc++'], default='native') parser.add_argument('--address-model', choices=['32', '64'], default='64') parser.add_argument('--separate-compilation', type=_str2bool, default=True) + parser.add_argument('--use-ts-executor', type=_str2bool, default=False) parser.add_argument('--address-sanitizer', type=_str2bool, default=False) parser.add_argument('--undefined-sanitizer', type=_str2bool, default=False) parser.add_argument('--server-host', default='127.0.0.1') @@ -529,6 +532,7 @@ def main(): stdlib=args.stdlib, address_model=args.address_model, separate_compilation=args.separate_compilation, + use_ts_executor=args.use_ts_executor, address_sanitizer=args.address_sanitizer, undefined_sanitizer=args.undefined_sanitizer, clean=args.clean, diff --git a/tools/scripts/build_unix_local.sh b/tools/scripts/build_unix_local.sh index 644199499..e094b5e64 100755 --- a/tools/scripts/build_unix_local.sh +++ b/tools/scripts/build_unix_local.sh @@ -40,6 +40,7 @@ docker exec $CONTAINER python /opt/boost-mysql/tools/ci.py --source-dir=/opt/boo --cxxstd=20 \ --variant=debug \ --separate-compilation=1 \ + --use-ts-executor=0 \ --cmake-standalone-tests=1 \ --cmake-add-subdir-tests=1 \ --cmake-install-tests=1 \