diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index cf95df0d3b..603395e324 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -8,6 +8,8 @@ jobs: build: env: VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' + CC: clang-14 + CXX: clang++-14 runs-on: ubuntu-22.04 steps: - name: Checkout @@ -44,17 +46,14 @@ jobs: setapikey "${{secrets.GITHUB_TOKEN}}" \ -source "https://nuget.pkg.github.com/BlueQuartzSoftware/index.json" - name: Configure - env: - CC: clang-14 - CXX: clang++-14 run: | cmake --preset ci-asan ${{github.workspace}} - name: Build run: | + export LD_LIBRARY_PATH=$($CXX -print-file-name=libclang_rt.asan-x86_64.so) cmake --build --preset ci-asan - name: Test run: | - export LD_PRELOAD=$(clang++-14 -print-file-name=libclang_rt.asan-x86_64.so) - ctest --preset ci-asan -E "PY" - export ASAN_OPTIONS=detect_leaks=0 - ctest --preset ci-asan -R "PY" + export LD_PRELOAD=$($CXX -print-file-name=libclang_rt.asan-x86_64.so) + export LSAN_OPTIONS=suppressions=${{github.workspace}}/utilites/leak_suppressions.txt + ctest --preset ci-asan diff --git a/utilities/leak_suppressions.txt b/utilities/leak_suppressions.txt new file mode 100644 index 0000000000..021271ca16 --- /dev/null +++ b/utilities/leak_suppressions.txt @@ -0,0 +1,3 @@ +leak:pybind11.h +leak:/usr/bin +leak:site-packages/