-
Notifications
You must be signed in to change notification settings - Fork 170
65 lines (54 loc) · 1.81 KB
/
asan5.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: ASAN Qt5
on:
push:
branches:
- main
- 2.2
pull_request:
branches:
- main
- 2.2
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
preset:
- name: ci-dev-asan-qt5
qt_version: "5.15"
steps:
- name: Install Qt ${{ matrix.preset.qt_version }}
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.preset.qt_version }}
cache: true
- name: Install dependencies on Ubuntu
run: |
sudo apt update -qq
sudo apt install lld libspdlog-dev ninja-build -y
- name: Checkout sources
uses: actions/checkout@v4
- name: Configure project
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
- name: Build Project ${{ matrix.preset.build_preset_arg }}
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}
- name: Fix ASAN on ubuntu 22.04
run: |
sudo sysctl vm.mmap_rnd_bits=28
sudo sysctl vm.mmap_rnd_compat_bits=8
- name: Run tests on Linux (offscreen)
run: ctest --test-dir ./build-${{ matrix.preset.name }} --output-on-failure
env:
QT_QPA_PLATFORM: offscreen
QT_QUICK_BACKEND: software
LSAN_OPTIONS: detect_leaks=0
- name: Read tests log when it fails
uses: andstor/file-reader-action@v1
if: ${{ failure() && startsWith(matrix.preset.name, 'ci-dev-') }}
with:
path: "./build-${{ matrix.preset.name }}/Testing/Temporary/LastTest.log"