feat: Pass sanitizer as part of conan_profile (#2189)

I noticed we don't need `sanitizer` value anymore, so removed it.
This commit is contained in:
Ayaz Salikhov
2025-06-10 16:04:00 +01:00
committed by GitHub
parent d3c98ab2a8
commit 6e0d7a0fac
7 changed files with 9 additions and 51 deletions

View File

@@ -25,15 +25,6 @@ inputs:
description: Whether Clio is to be statically linked description: Whether Clio is to be statically linked
required: true required: true
default: "false" default: "false"
sanitizer:
description: Sanitizer to use
required: true
default: "false"
choices:
- "false"
- "tsan"
- "asan"
- "ubsan"
time_trace: time_trace:
description: Whether to enable compiler trace reports description: Whether to enable compiler trace reports
required: true required: true
@@ -74,9 +65,9 @@ runs:
env: env:
BUILD_TYPE: "${{ inputs.build_type }}" BUILD_TYPE: "${{ inputs.build_type }}"
SANITIZER_OPTION: |- SANITIZER_OPTION: |-
${{ inputs.sanitizer == 'tsan' && '-Dsan=thread' || ${{ endsWith(inputs.conan_profile, '.asan') && '-Dsan=address' ||
inputs.sanitizer == 'ubsan' && '-Dsan=undefined' || endsWith(inputs.conan_profile, '.tsan') && '-Dsan=thread' ||
inputs.sanitizer == 'asan' && '-Dsan=address' || endsWith(inputs.conan_profile, '.ubsan') && '-Dsan=undefined' ||
'' }} '' }}
run: | run: |
cd build cd build

View File

@@ -76,7 +76,6 @@ jobs:
static: true static: true
upload_clio_server: false upload_clio_server: false
targets: all targets: all
sanitizer: "false"
analyze_build_time: false analyze_build_time: false
secrets: secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -57,12 +57,6 @@ on:
type: string type: string
default: all default: all
sanitizer:
description: Sanitizer to use
required: false
type: string
default: "false"
jobs: jobs:
build: build:
uses: ./.github/workflows/build_impl.yml uses: ./.github/workflows/build_impl.yml
@@ -76,7 +70,6 @@ jobs:
static: ${{ inputs.static }} static: ${{ inputs.static }}
upload_clio_server: ${{ inputs.upload_clio_server }} upload_clio_server: ${{ inputs.upload_clio_server }}
targets: ${{ inputs.targets }} targets: ${{ inputs.targets }}
sanitizer: ${{ inputs.sanitizer }}
analyze_build_time: false analyze_build_time: false
test: test:
@@ -89,4 +82,3 @@ jobs:
build_type: ${{ inputs.build_type }} build_type: ${{ inputs.build_type }}
run_unit_tests: ${{ inputs.run_unit_tests }} run_unit_tests: ${{ inputs.run_unit_tests }}
run_integration_tests: ${{ inputs.run_integration_tests }} run_integration_tests: ${{ inputs.run_integration_tests }}
sanitizer: ${{ inputs.sanitizer }}

View File

@@ -48,11 +48,6 @@ on:
required: true required: true
type: string type: string
sanitizer:
description: Sanitizer to use
required: true
type: string
analyze_build_time: analyze_build_time:
description: Whether to enable build time analysis description: Whether to enable build time analysis
required: true required: true
@@ -106,7 +101,6 @@ jobs:
build_type: ${{ inputs.build_type }} build_type: ${{ inputs.build_type }}
code_coverage: ${{ inputs.code_coverage }} code_coverage: ${{ inputs.code_coverage }}
static: ${{ inputs.static }} static: ${{ inputs.static }}
sanitizer: ${{ inputs.sanitizer }}
time_trace: ${{ inputs.analyze_build_time }} time_trace: ${{ inputs.analyze_build_time }}
- name: Build Clio - name: Build Clio
@@ -140,11 +134,11 @@ jobs:
cat /tmp/ccache.stats cat /tmp/ccache.stats
- name: Strip unit_tests - name: Strip unit_tests
if: inputs.sanitizer == 'false' && !inputs.code_coverage && !inputs.analyze_build_time if: ${{ !endsWith(inputs.conan_profile, 'san') && !inputs.code_coverage && !inputs.analyze_build_time }}
run: strip build/clio_tests run: strip build/clio_tests
- name: Strip integration_tests - name: Strip integration_tests
if: inputs.sanitizer == 'false' && !inputs.code_coverage && !inputs.analyze_build_time if: ${{ !endsWith(inputs.conan_profile, 'san') && !inputs.code_coverage && !inputs.analyze_build_time }}
run: strip build/clio_integration_tests run: strip build/clio_integration_tests
- name: Upload clio_server - name: Upload clio_server

View File

@@ -35,25 +35,21 @@ jobs:
conan_profile: default_apple_clang conan_profile: default_apple_clang
build_type: Release build_type: Release
static: false static: false
sanitizer: "false"
- os: heavy - os: heavy
conan_profile: gcc conan_profile: gcc
build_type: Release build_type: Release
static: true static: true
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }' container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
sanitizer: "false"
- os: heavy - os: heavy
conan_profile: gcc conan_profile: gcc
build_type: Debug build_type: Debug
static: true static: true
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }' container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
sanitizer: "false"
- os: heavy - os: heavy
conan_profile: gcc.ubsan conan_profile: gcc.ubsan
build_type: Release build_type: Release
static: false static: false
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }' container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
sanitizer: "ubsan"
uses: ./.github/workflows/build_and_test.yml uses: ./.github/workflows/build_and_test.yml
with: with:
@@ -66,7 +62,6 @@ jobs:
run_integration_tests: true run_integration_tests: true
upload_clio_server: true upload_clio_server: true
disable_cache: true disable_cache: true
sanitizer: ${{ matrix.sanitizer }}
analyze_build_time: analyze_build_time:
name: Analyze Build Time name: Analyze Build Time
@@ -94,7 +89,6 @@ jobs:
static: ${{ matrix.static }} static: ${{ matrix.static }}
upload_clio_server: false upload_clio_server: false
targets: all targets: all
sanitizer: "false"
analyze_build_time: true analyze_build_time: true
nightly_release: nightly_release:

View File

@@ -36,24 +36,17 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: conan_profile: ["gcc.asan", "gcc.tsan", "gcc.ubsan"]
- sanitizer: tsan
compiler: gcc
- sanitizer: asan
compiler: gcc
- sanitizer: ubsan
compiler: gcc
uses: ./.github/workflows/build_and_test.yml uses: ./.github/workflows/build_and_test.yml
with: with:
runs_on: heavy runs_on: heavy
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }' container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
disable_cache: true disable_cache: true
conan_profile: ${{ matrix.compiler }}.${{ matrix.sanitizer }} conan_profile: ${{ matrix.conan_profile }}
build_type: Release build_type: Release
static: false static: false
run_unit_tests: true run_unit_tests: true
run_integration_tests: false run_integration_tests: false
upload_clio_server: false upload_clio_server: false
targets: clio_tests clio_integration_tests targets: clio_tests clio_integration_tests
sanitizer: ${{ matrix.sanitizer }}

View File

@@ -33,11 +33,6 @@ on:
required: true required: true
type: boolean type: boolean
sanitizer:
description: Sanitizer to use
required: true
type: string
jobs: jobs:
unit_tests: unit_tests:
name: Unit testing ${{ inputs.container != '' && 'in container' || 'natively' }} name: Unit testing ${{ inputs.container != '' && 'in container' || 'natively' }}
@@ -47,8 +42,8 @@ jobs:
if: inputs.run_unit_tests if: inputs.run_unit_tests
env: env:
# TODO: remove when we have fixed all currently existing issues from sanitizers # TODO: remove completely when we have fixed all currently existing issues with sanitizers
SANITIZER_IGNORE_ERRORS: ${{ inputs.sanitizer != 'false' && inputs.sanitizer != 'ubsan' }} SANITIZER_IGNORE_ERRORS: ${{ endsWith(inputs.conan_profile, '.asan') || endsWith(inputs.conan_profile, '.tsan') }}
steps: steps:
- name: Clean workdir - name: Clean workdir