Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@
name: Build

on:
workflow_dispatch:
pull_request: {}
push: { branches: [main] }

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "QMake Qt5"
qt-version: "5.15.2"
build-system: qmake
- name: "CMake Qt6"
qt-version: "6.8.3"
build-system: cmake

name: ${{ matrix.name }}

steps:
- uses: actions/checkout@v4

- name: Installing Qt
uses: jurplel/install-qt-action@v4
with:
version: "5.15.2"
version: ${{ matrix.qt-version }}

- name: Configure Project with QMake
if: matrix.build-system == 'qmake'
run: qmake

- name: Build
- name: Build with QMake
if: matrix.build-system == 'qmake'
run: make -j$(nproc)

- name: Configure Project with CMake
if: matrix.build-system == 'cmake'
run: cmake -S . -B build -GNinja

- name: Build with CMake
if: matrix.build-system == 'cmake'
run: cmake --build build --target all
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ project(
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTORCC ON)

find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Qml Quick)

option(BUILD_EXAMPLES "Build examples" OFF)
Expand Down