Skip to content

ci: Use our existing asan worker for both lsan and asan #362

ci: Use our existing asan worker for both lsan and asan

ci: Use our existing asan worker for both lsan and asan #362

Workflow file for this run

# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: Build (Qt6)
on:
push:
branches:
- main
- 2.4
pull_request:
branches:
- main
- 2.4
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-24.04
- windows-2022
- macos-15
preset:
- name: ci-dev-qt6
qt_version: "6.10.1"
- name: ci-dev-hardened
qt_version: "6.10.0"
- name: ci-release-qt6
qt_version: "6.3.*"
- name: ci-qtwidgets-qt6
qt_version: "6.3.*"
- name: ci-qtquick-qt6
qt_version: "6.3.*"
- name: ci-dev-static-qt6
qt_version: "6.3.*"
- name: ci-release-static-qt6
qt_version: "6.3.*"
steps:
- name: Export IS_SELFHOSTED
run: echo "IS_SELFHOSTED=$IS_SELFHOSTED" >> $GITHUB_ENV
- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion
uses: jurplel/install-qt-action@v4
if: env.IS_SELFHOSTED != 1
with:
version: ${{ matrix.preset.qt_version }}
cache: true
- name: Install dependencies on Ubuntu (${{ join(matrix.preset.apt_pgks, ' ') }})
if: ${{ runner.os == 'Linux' && matrix.preset.apt_pgks }}
run: |
sudo apt update -qq
echo ${{ join(matrix.preset.apt_pgks, ' ') }} | xargs sudo apt install -y
# Not using apt_pgks, since spdlog is needed for all configurations:
- name: Install spdlog on Ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt install libspdlog-dev -y
- name: Install ninja (Windows / Linux)
if: ${{ runner.os != 'macOS' }}
uses: turtlesec-no/get-ninja@main
- name: Install ninja (macOS)
if: ${{ runner.os == 'macOS' }}
run: brew install ninja
- name: Checkout sources
uses: actions/checkout@v4
- name: Make sure MSVC is found when Ninja generator is in use
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Configure project
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }} -DCMAKE_INSTALL_PREFIX=install
- name: Build Project ${{ matrix.preset.build_preset_arg }}
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}
- name: Install
run: cmake --build ./build-${{ matrix.preset.name }} --target install
- name: Run tests on Linux
if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os == 'Linux' }}
run: ctest --test-dir ./build-${{ matrix.preset.name }} --verbose -j 4
env:
QT_QUICK_BACKEND: software
LSAN_OPTIONS: detect_leaks=${{ matrix.preset.detect_leaks }}
- name: Run tests on Window/macOS
if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os != 'Linux' }}
run: ctest --test-dir ./build-${{ matrix.preset.name }} --verbose --output-on-failure -j 4