Skip to content

Commit adf1436

Browse files
committed
ci: Also build against an ASAN Qt
We now have Qt 6.11 builds built against ASAN/LSAN. Added a minimal CMakePresets.json for the purpose of this task. Patches accepted to add Window/macOS/static/ECM Sanitizers to it.
1 parent 1848dd6 commit adf1436

2 files changed

Lines changed: 86 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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: ['dev-asan']
25+
include:
26+
- preset: dev-asan
27+
qt-flavor: asan
28+
steps:
29+
- name: Checkout sources
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Sanitized Qt
33+
uses: KDABLabs/sanitized-qt-action@v1
34+
with:
35+
qt-tag: "v6.11.0-beta2"
36+
qt-flavor: ${{ matrix.qt-flavor }}
37+
38+
- name: Configure
39+
run: cmake --preset=${{ matrix.preset }}
40+
41+
- name: Build
42+
run: cmake --build ./build-${{ matrix.preset }}
43+
44+
- name: Run tests
45+
run: |
46+
ctest --test-dir ./build-${{ matrix.preset }} --output-on-failure

CMakePresets.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"version": 5,
3+
"configurePresets": [
4+
{
5+
"name": "base",
6+
"generator": "Ninja",
7+
"binaryDir": "${sourceDir}/build-${presetName}",
8+
"hidden": true,
9+
"cacheVariables": {
10+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
11+
},
12+
"warnings": {
13+
"uninitialized": true
14+
},
15+
"errors": {
16+
"dev": true
17+
}
18+
},
19+
{
20+
"name": "dev",
21+
"inherits": ["base"],
22+
"cacheVariables": {
23+
"CMAKE_BUILD_TYPE": "Debug",
24+
"KDSingleApplication_DOCS": "OFF",
25+
"KDSingleApplication_EXAMPLES": "ON",
26+
"KDSingleApplication_TESTS": "ON",
27+
"KDSingleApplication_QT6": "ON"
28+
}
29+
},
30+
{
31+
"name": "dev-asan",
32+
"inherits": ["dev"],
33+
"cacheVariables": {
34+
"CMAKE_CXX_FLAGS": "-DQT_FORCE_ASSERTS -fsanitize=address -fsanitize=undefined -fno-optimize-sibling-calls",
35+
"CMAKE_SHARED_LINKER_FLAGS": "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer",
36+
"CMAKE_EXE_LINKER_FLAGS": "-fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
37+
}
38+
}
39+
]
40+
}

0 commit comments

Comments
 (0)