diff --git a/.github/workflows/build-sanitizers.yml b/.github/workflows/build-sanitizers.yml new file mode 100644 index 00000000..6668b06f --- /dev/null +++ b/.github/workflows/build-sanitizers.yml @@ -0,0 +1,49 @@ +# SPDX-FileCopyrightText: 2026 Klarälvdalens Datakonsult AB, a KDAB Group company +# +# SPDX-License-Identifier: MIT + +name: CI (Sanitizers) + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: + - ubuntu-24.04 + preset: ['dev-asan'] + include: + - preset: dev-asan + qt-flavor: asan + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Setup Sanitized Qt + uses: KDABLabs/sanitized-qt-action@v1 + with: + qt-tag: "v6.11.0-beta2" + qt-flavor: ${{ matrix.qt-flavor }} + + - name: Configure + run: cmake --preset=${{ matrix.preset }} -DKDChart_STATIC=ON + + - name: Build + run: cmake --build ./build/${{ matrix.preset }} + + - name: Run tests + run: | + ctest --test-dir ./build/${{ matrix.preset }} --output-on-failure --verbose + env: + LSAN_OPTIONS: "detect_leaks=0" # patches accepted + QT_QPA_PLATFORM: "offscreen" diff --git a/.gitignore b/.gitignore index ff44babb..21e6eb97 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ kdchart/tests/Gantt/unittest/unittest kdchart/tests/Gantt/unittest/TestUnittests Makefile* +compile_commands.json +.cache