From ec12be985a1de7cf3d2a537ba60dacdc753d9eb9 Mon Sep 17 00:00:00 2001 From: Michael Polyntsov Date: Sun, 19 Feb 2023 00:57:31 +0300 Subject: [PATCH] Add tests with UB Sanitizer workflow --- .github/workflows/cmake.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index b1a8bc73c7..c57268f7c7 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -12,6 +12,9 @@ jobs: strategy: matrix: BUILD_TYPE: [ Release, Debug ] + include: + - SANITIZER: [ ADDRESS, UB ] + BUILD_TYPE: Debug steps: - uses: actions/checkout@v2 - name: Install build tools @@ -117,10 +120,11 @@ jobs: -DCMAKE_CXX_COMPILER=g++-10 -DBOOST_ROOT=${{github.workspace}}/lib/boost -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} + -DSANITIZER=${{matrix.SANITIZER}} -Dgtest_disable_pthreads=OFF - name: Build run: cmake --build ${{github.workspace}}/build --config ${{matrix.BUILD_TYPE}} - name: Test working-directory: ${{github.workspace}}/build/target shell: bash - run: ./Desbordante_test --gtest_filter='*:-*HeavyDatasets*' + run: UBSAN_OPTIONS="halt_on_error=1" ./Desbordante_test --gtest_filter='*:-*HeavyDatasets*'