Skip to content

[#29] open images in own windows (modal) for detail view #54

[#29] open images in own windows (modal) for detail view

[#29] open images in own windows (modal) for detail view #54

Workflow file for this run

name: Build QLiteHtmlBrowser
on:
push:
branches: [main, qt6, qt5]
pull_request:
workflow_call:
jobs:
check-formatting:
name: Check code formatting
runs-on: ubuntu-latest
strategy:
matrix:
path: ['include', 'src', 'test']
steps:
- uses: actions/checkout@v4
- uses: jidicula/clang-format-action@v4.13.0
with:
clang-format-version: '18'
check-path: ${{ matrix.path }}
build:
needs: check-formatting
name: Build (${{ matrix.os }} - Qt ${{ matrix.qt-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ========== Linux Builds ==========
# Qt 6 (latest) on Linux
- os: ubuntu-latest
qt-version: '6.7.*'
qt-modules: 'qt5compat qtsvg'
name: Linux-Qt6
use-apt: false
test-cmd: xvfb-run -a ctest -V -E NOT_BUILT
# Qt 5.15 LTS on Linux
- os: ubuntu-22.04
qt-version: '5.15.2'
qt-modules: ''
name: Linux-Qt5
use-apt: true
apt-packages: 'qtbase5-dev qttools5-dev libqt5svg5-dev ninja-build xvfb libxcb-cursor0'
test-cmd: xvfb-run -a ctest -V -E NOT_BUILT
# ========== Windows Builds ==========
# Qt 6 (latest) on Windows
- os: windows-latest
qt-version: '6.7.*'
qt-arch: 'win64_msvc2019_64'
qt-modules: 'qt5compat qtsvg'
name: Windows-Qt6
use-apt: false
test-cmd: ctest -C Release -V -E NOT_BUILT
# Qt 5.15 LTS on Windows
- os: windows-latest
qt-version: '5.15.2'
qt-arch: 'win64_msvc2019_64'
qt-modules: 'qtsvg'
name: Windows-Qt5
use-apt: false
test-cmd: ctest -C Release -V -E NOT_BUILT
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# ========== Linux: Qt via APT (Qt5 only) ==========
- name: Install Qt via APT (Linux Qt5)
if: runner.os == 'Linux' && matrix.use-apt
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.apt-packages }}
# ========== Linux/Windows: Qt via installer (Qt6 and Windows Qt5) ==========
- name: Install Qt via installer
if: ${{ !matrix.use-apt }}
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt-version }}
arch: ${{ matrix.qt-arch || '' }}
modules: ${{ matrix.qt-modules }}
cache: true
# ========== Windows: MSVC + Ninja ==========
- name: Setup MSVC (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install Ninja (Windows)
if: runner.os == 'Windows'
run: choco install ninja
- name: Install Ninja (Linux - if needed)
if: runner.os == 'Linux' && !matrix.use-apt
run: sudo apt-get install -y ninja-build xvfb libxcb-cursor0
# ========== CMake Configure ==========
- name: Configure CMake (Linux)
if: runner.os == 'Linux'
run: cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Release
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
run: |
cmake -B build `
-GNinja `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_C_COMPILER=cl `
-DCMAKE_CXX_COMPILER=cl
# ========== Build ==========
- name: Build
run: cmake --build build --config Release
# ========== Test ==========
- name: Run Tests
working-directory: build
run: ${{ matrix.test-cmd }}
continue-on-error: true