Skip to content

Commit 4275c0a

Browse files
committed
ci: Add ASAN Qt 6.11 builds
Comes from KDAB's prebuilt Qt with ASAN. TSAN is not needed, as KDSME doesn't use threads. LSAN to be enabled if build passes
1 parent 01d4d95 commit 4275c0a

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SPDX-FileCopyrightText: 2026 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
name: CI (Sanitizers)
6+
7+
on:
8+
push:
9+
branches:
10+
- master
11+
pull_request:
12+
branches:
13+
- master
14+
workflow_dispatch:
15+
16+
jobs:
17+
build:
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: true
21+
matrix:
22+
os:
23+
- ubuntu-24.04
24+
preset: ['dev6-asan']
25+
include:
26+
- preset: dev6-asan
27+
qt-flavor: asan
28+
steps:
29+
- name: Checkout sources
30+
uses: actions/checkout@v4
31+
32+
- name: Checkout sources
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: recursive
36+
37+
- name: Setup Sanitized Qt
38+
uses: KDABLabs/sanitized-qt-action@v1
39+
with:
40+
qt-tag: "v6.11.0-beta2"
41+
qt-flavor: ${{ matrix.qt-flavor }}
42+
43+
- name: Configure project
44+
run: >
45+
cmake --preset=${{ matrix.preset }}
46+
-DCMAKE_BUILD_TYPE=Debug
47+
-DBUILD_TESTING=OFF
48+
-DKDSME_EXAMPLES=ON
49+
-DKDSME_DOCS=OFF
50+
-DBUILD_SHARED_LIBS=OFF
51+
52+
- name: Build Project
53+
run: cmake --build ./build-${{ matrix.preset }}
54+
55+
- name: Run tests on Linux (offscreen)
56+
run: |
57+
ctest --test-dir ./build-${{ matrix.preset }} --output-on-failure
58+
env:
59+
QT_QPA_PLATFORM: offscreen
60+
LSAN_OPTIONS: "detect_leaks=0"

CMakePresets.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@
5353
"KDSME_INTERNAL_GRAPHVIZ": "ON"
5454
}
5555
},
56+
{
57+
"name": "dev6-asan",
58+
"inherits": "dev6",
59+
"binaryDir": "${sourceDir}/build-dev6-asan",
60+
"cacheVariables": {
61+
"CMAKE_CXX_FLAGS": "-DQT_FORCE_ASSERTS -fsanitize=address -fsanitize=undefined -fno-optimize-sibling-calls",
62+
"CMAKE_SHARED_LINKER_FLAGS": "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer",
63+
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
64+
}
65+
},
5666
{
5767
"name": "rel-base",
5868
"description": "rel-base",

0 commit comments

Comments
 (0)