Add separate jobs to run tests with ASAN, TSAN, UBSAN

To not slow down benchmarks with all optimizations.
This commit is contained in:
elsid 2022-01-29 03:16:58 +01:00
parent b0f192d878
commit 28ce8fd0f3
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
2 changed files with 59 additions and 3 deletions

View file

@ -52,13 +52,25 @@ if [[ "${CMAKE_BUILD_TYPE}" ]]; then
)
fi
if [[ "${CMAKE_CXX_FLAGS_DEBUG}" ]]; then
CMAKE_CONF_OPTS+=(
-DCMAKE_CXX_FLAGS_DEBUG="${CMAKE_CXX_FLAGS_DEBUG}"
)
fi
if [[ "${CMAKE_EXE_LINKER_FLAGS}" ]]; then
CMAKE_CONF_OPTS+=(
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS}"
)
fi
mkdir -p build
cd build
if [[ "${BUILD_TESTS_ONLY}" ]]; then
# flags specific to our test suite
CXX_FLAGS="-Wno-error=deprecated-declarations -Wno-error=nonnull -Wno-error=deprecated-copy -fsanitize=address"
CXX_FLAGS="-Wno-error=deprecated-declarations -Wno-error=nonnull -Wno-error=deprecated-copy"
if [[ "${CXX}" == 'clang++' ]]; then
CXX_FLAGS="${CXX_FLAGS} -Wno-error=unused-lambda-capture -Wno-error=gnu-zero-variadic-macro-arguments"
fi