Merge pull request #31 from KDABLabs/cmake #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> | |
| # | |
| # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| # - windows-latest | |
| # - macos-15 | |
| steps: | |
| - name: Install Qt ${{ matrix.preset.qt_version }} | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: 5.15 | |
| cache: true | |
| - name: Install dependencies | |
| if: ${{ runner.os == 'Linux' }} | |
| run: | | |
| sudo apt update -qq | |
| sudo apt install xvfb | |
| - name: Install ninja-build tool (must be after Qt due PATH changes) | |
| uses: turtlesec-no/get-ninja@main | |
| - 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: Build project (cmake) | |
| run: | | |
| cmake --preset=dev . | |
| cmake --build build-dev | |
| - name: Run tests (Linux) | |
| if: ${{ runner.os == 'Linux' }} | |
| run: xvfb-run ctest --test-dir ./build-dev --verbose | |
| env: | |
| DISPLAY: ":0" |