Skip to content

Refactor

Refactor #24

Workflow file for this run

# Copyright 2015 - 2025, GIBIS-Unifesp and the wiRedPanda contributors
# SPDX-License-Identifier: GPL-3.0-or-later
name: Build CMake
on:
push:
branches-ignore:
- master
pull_request:
branches:
- master
types: [opened, synchronize, reopened]
jobs:
build_cmake:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
qt_version: [5.12.12, 5.13.2, 5.14.2, 5.15.2, 6.2.4, 6.3.2, 6.4.3, 6.5.3, 6.6.3, 6.7.3, 6.8.2, 6.9.0]
# =================================
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Qt5
if: startsWith(matrix.qt_version, '5')
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
cache: true
aqtversion: ==3.2.*
- name: Install CUPS dependency for Qt 6.7.*
if: matrix.os == 'ubuntu-latest' && startsWith(matrix.qt_version, '6.7')
run: sudo apt update && sudo apt install -y libcups2-dev
- name: Install Qt6
if: startsWith(matrix.qt_version, '6')
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
modules: qtmultimedia qtimageformats
cache: true
aqtversion: ==3.2.*
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}-${{ matrix.qt_version }}
# =================================
- name: Build Ubuntu
if: runner.os == 'Linux'
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$QT_INSTALL_PATH
cmake --build build
- name: Test Ubuntu
if: runner.os == 'Linux'
run: |
cd build
./test -platform offscreen
# =================================
- name: Setup MSVC Toolchain
if: runner.os == 'Windows'
uses: pbeast/gha-setup-vsdevenv@master
- name: Build Windows
if: runner.os == 'Windows'
run: |
cmake -S . -B build `
-DCMAKE_PREFIX_PATH=$QT_INSTALL_PATH
cmake --build build
- name: Test Windows
if: runner.os == 'Windows'
run: |
cd build/Debug
./test.exe
# =================================
- name: Build macOS
if: runner.os == 'macOS'
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=$QT_INSTALL_PATH
cmake --build build
- name: Test macOS
if: runner.os == 'macOS'
run: |
cd build
./test