Skip to content

Commit

Permalink
ci: Move the lsan builders from build.yml into a dedicated file
Browse files Browse the repository at this point in the history
Qt 6.7 requires arch linux_gcc_64 instead of gcc_64, which is
which would require more iffery in build.yml which is already
complex.

I prefer having many simple yml files instead of a swiss army-knife
build.yml
  • Loading branch information
iamsergio committed Mar 16, 2024
1 parent 6e65b2a commit 978f9cb
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 14 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,6 @@ jobs:
- llvm
pip_pgks:
- shiboken6-generator==6.6.0 pyside6==6.6.0
- os: ubuntu-latest
preset:
name: ci-dev-asan-qtwidgets-qt6
qt_version: "6.7.*"
detect_leaks: 1
apt_pgks:
- lld
- os: ubuntu-latest
preset:
name: ci-dev-asan-qtquick-qt6
qt_version: "6.7.*"
detect_leaks: 1
apt_pgks:
- lld

steps:
- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/lsan6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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: Workflow for running leak check on Qt6 KDDW

on:
push:
branches:
- 2.1
- main
pull_request:
branches:
- 2.1
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
preset:
- name: ci-dev-asan-qtwidgets-qt6
qt_version: "6.7.0"
- name: ci-dev-asan-qtquick-qt6
qt_version: "6.7.0"

steps:
- name: Install Qt ${{ matrix.preset.qt_version }}
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.preset.qt_version }}
cache: true
arch: linux_gcc_64

- 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: 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=1

- 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"

0 comments on commit 978f9cb

Please sign in to comment.