From 8b2dfb584c5fcde0b48d30a88b4dc747413cdb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:35:09 +0100 Subject: [PATCH] WORKFLOW --- .github/workflows/code_sanitizers.yml | 13 +++++++++---- ci/build.sh | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_sanitizers.yml b/.github/workflows/code_sanitizers.yml index 5e55563317..aa6b81099a 100644 --- a/.github/workflows/code_sanitizers.yml +++ b/.github/workflows/code_sanitizers.yml @@ -4,19 +4,24 @@ on: [push, pull_request, workflow_dispatch] jobs: linux_sanitizers: - name: Linux [${{ matrix.SANITIZER }}] [${{ matrix.BACKEND }} | ${{ matrix.COMPILER }}] + name: Linux [${{ matrix.SANITIZER.name }}] [${{ matrix.BACKEND }} | ${{ matrix.COMPILER }}] timeout-minutes: 120 strategy: fail-fast: false matrix: BACKEND: [lmdb, rocksdb] COMPILER: [clang] - SANITIZER: [ASAN, ASAN_INT, TSAN] + SANITIZER: + - { name: UBSAN, ignore_errors: false } + - { name: ASAN, ignore_errors: true } + - { name: ASAN_INT, ignore_errors: true } + - { name: TSAN, ignore_errors: false } runs-on: ubuntu-22.04 env: COMPILER: ${{ matrix.COMPILER }} BACKEND: ${{ matrix.BACKEND }} - SANITIZER: ${{ matrix.SANITIZER }} + SANITIZER: ${{ matrix.SANITIZER.name }} + IGNORE_ERRORS: ${{ matrix.SANITIZER.ignore_errors }} TEST_USE_ROCKSDB: ${{ matrix.BACKEND == 'rocksdb' && '1' || '0' }} DEADLINE_SCALE_FACTOR: ${{ matrix.BACKEND == 'rocksdb' && '2' || '1' }} ASAN_OPTIONS: log_exe_name=1:log_path=sanitizer_report:suppressions=../asan_suppressions @@ -50,6 +55,6 @@ jobs: - name: Reports if: steps.build.outcome == 'success' && (success() || failure()) - continue-on-error: true + continue-on-error: ${{ env.IGNORE_ERRORS == 'true' }} run: ../ci/tests/show-sanitizer-reports.sh working-directory: build diff --git a/ci/build.sh b/ci/build.sh index 62192e7e7d..b3ef5547ff 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -35,6 +35,9 @@ if [[ ${SANITIZER:-} ]]; then TSAN) CMAKE_SANITIZER="-DNANO_TSAN=ON" ;; + UBSAN) + CMAKE_SANITIZER="-DNANO_UBSAN=ON" + ;; *) echo "Unknown sanitizer: '${SANITIZER}'" exit 1