build conan deps with sanitizers to fix tsan crashes

Signed-off-by: Pratik Mankawde <pmankawde@ripple.com>
This commit is contained in:
Pratik Mankawde
2025-11-19 15:34:24 +00:00
parent 5befd5d249
commit d026d0640f
7 changed files with 234 additions and 215 deletions

View File

@@ -21,6 +21,10 @@ inputs:
description: "The logging verbosity."
required: false
default: "verbose"
sanitizers:
description: "The sanitizers to enable ('None', 'Address', 'Thread')."
required: false
default: "None"
runs:
using: composite
@@ -33,6 +37,7 @@ runs:
BUILD_OPTION: ${{ inputs.force_build == 'true' && '*' || 'missing' }}
BUILD_TYPE: ${{ inputs.build_type }}
LOG_VERBOSITY: ${{ inputs.log_verbosity }}
SANITIZERS: ${{ inputs.sanitizers }}
run: |
echo 'Installing dependencies.'
mkdir -p "${BUILD_DIR}"

View File

@@ -208,7 +208,8 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
'build_only': build_only,
'build_type': build_type,
'os': os,
'architecture': architecture
'architecture': architecture,
'sanitizers': 'Address'
})
linker_flags = ''
@@ -239,7 +240,8 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
'build_only': build_only,
'build_type': build_type,
'os': os,
'architecture': architecture
'architecture': architecture,
'sanitizers': 'Thread'
})
else:
if cxx_flags:

View File

@@ -50,6 +50,12 @@ on:
type: number
default: 2
sanitizers:
description: "The sanitizers to enable ('Address+UndefinedBehaviour' or 'Thread+UndefinedBehaviour')."
required: false
type: string
default: "None"
secrets:
CODECOV_TOKEN:
description: "The Codecov token to use for uploading coverage reports."
@@ -103,6 +109,7 @@ jobs:
# Set the verbosity to "quiet" for Windows to avoid an excessive
# amount of logs. For other OSes, the "verbose" logs are more useful.
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
sanitizers: ${{ inputs.sanitizers }}
- name: Configure CMake
working-directory: ${{ inputs.build_dir }}

View File

@@ -54,5 +54,6 @@ jobs:
runs_on: ${{ toJSON(matrix.architecture.runner) }}
image: ${{ contains(matrix.architecture.platform, 'linux') && format('ghcr.io/xrplf/ci/{0}-{1}:{2}-{3}-sha-{4}', matrix.os.distro_name, matrix.os.distro_version, matrix.os.compiler_name, matrix.os.compiler_version, matrix.os.image_sha) || '' }}
config_name: ${{ matrix.config_name }}
sanitizers: ${{ matrix.sanitizers }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}