First Commit

This commit is contained in:
2025-11-18 14:18:26 -07:00
parent 33eb6e3707
commit 27277ec342
6106 changed files with 3571167 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#
# This file is part of KDDockWidgets.
#
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sérgio Martins <sergio.martins@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
#
# Contact KDAB at <info@kdab.com> for commercial licensing options.
# Dockerfile for qt6-asan GitHub Action
FROM iamsergio/kddw-qt6-asan
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
ENV PATH=$PATH:/Qt6/bin/
ENV LD_LIBRARY_PATH=/Qt6/lib/
ENV QT_QUICK_BACKEND=software
ENV LSAN_OPTIONS=detect_leaks=0
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -0,0 +1,73 @@
#
# This file is part of KDDockWidgets.
#
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sérgio Martins <sergio.martins@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
#
# Contact KDAB at <info@kdab.com> for commercial licensing options.
# Dockerfile for qt6-asan GitHub Action
# Instructions for manual inspection:
# docker build -t kddw-qt6-asan .
# docker run -it -v /data/sources/kddockwidgets/:/kddockwidgets/ kddw-qt6-asan
# cd /kddockwidgets/
# cmake --preset=dev-asan6
# cd build-dev-asan6 && ninja
# ctest -j12
# To prepare an image for GitHub actions we import and export to remove layers
# so the image occupies less space:
# docker build -t kddw-qt6-asan .
# docker run -it kddw-qt6-asan # and exit
# docker ps # to check sha
# docker export -o mycontainer.tar <container_sha>
# docker import mycontainer.tar
# docker images # to check sha
# docker tag <image_sha> iamsergio/kddw-qt6-asan
# docker push iamsergio/kddw-qt6-asan
FROM ubuntu:24.04
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
ENV TZ=Europe/Berlin
ENV LC_CTYPE=C.UTF-8
ENV PATH=$PATH:/Qt6/bin/
ENV LD_LIBRARY_PATH=/Qt6/lib/
ENV QT_QUICK_BACKEND=software
ENV LSAN_OPTIONS=detect_leaks=0
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update
RUN apt install build-essential software-properties-common lld git cmake ninja-build \
mesa-common-dev libglu1-mesa-dev libglib2.0-dev libfontconfig \
libxkbcommon-dev mesa-utils libgl1-mesa-dev libglu1-mesa-dev \
libxslt-dev libspdlog-dev -y
RUN mkdir /sources/
RUN git clone https://code.qt.io/qt/qt5.git /sources/qt6
RUN cd /sources/qt6 && git switch 6.6 && perl init-repository --module-subset=qtbase,qtshadertools,qtdeclarative
# Build qtbase first, so we can delete its build dir to save space, as GitHub has storage limits
RUN mkdir /build/ && cd /build/ && /sources/qt6/qtbase/configure -prefix /Qt6/ -debug -sanitize address -- -DQT_BUILD_EXAMPLES=OFF
RUN cmake --build /build/ --parallel
RUN cmake --install /build/
RUN rm -rf /build/
# qtshadertools
RUN mkdir /build/ && cd /build/ && qt-cmake -G Ninja /sources/qt6/qtshadertools/
RUN cmake --build /build/ --parallel
RUN cmake --install /build/
RUN rm -rf /build/
# qtdeclarative
RUN mkdir /build/ && cd /build/ && qt-cmake -G Ninja /sources/qt6/qtdeclarative/
RUN cmake --build /build/ --parallel
RUN cmake --install /build/
RUN rm -rf /build/
RUN rm -rf /sources/

View File

@@ -0,0 +1,4 @@
# qt6-asan
An action that builds and runs KDDW's tests against an ASAN build of Qt itself.
The Dockerfile clones and builds Qt6 with ASAN.

View File

@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2024 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-against-qt6-asan'
description: 'Builds and runs KDDW tests against a Qt6 built with ASAN/UBSAN'
runs:
using: 'docker'
image: 'Dockerfile'

View File

@@ -0,0 +1,8 @@
#!/bin/sh -l
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
cd /github/workspace/ || exit 1
env
cmake --preset=ci-dev-asan-qt6 -DCMAKE_PREFIX_PATH=/Qt6 && cd build-ci-dev-asan-qt6/ && ninja && ctest -j4 --output-on-failure

View File

@@ -0,0 +1,22 @@
#
# This file is part of KDDockWidgets.
#
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
# Author: Sérgio Martins <sergio.martins@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
#
# Contact KDAB at <info@kdab.com> for commercial licensing options.
# Dockerfile for qt6-asan GitHub Action
FROM iamsergio/kddw-qt6-asan
MAINTAINER Sergio Martins (sergio.martins@kdab.com)
ENV PATH=$PATH:/Qt6/bin/
ENV LD_LIBRARY_PATH=/Qt6/lib/
ENV QT_QUICK_BACKEND=software
ENV LSAN_OPTIONS=detect_leaks=1
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -0,0 +1,4 @@
# qt6-asan
An action that builds and runs KDDW's tests against an LSAN build
The Dockerfile clones and builds Qt6 with ASAN.

View File

@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2024 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-against-qt6-lsan'
description: 'Builds and runs KDDW tests against a Qt6 built with LSAN'
runs:
using: 'docker'
image: 'Dockerfile'

View File

@@ -0,0 +1,9 @@
#!/bin/sh -l
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
cd /github/workspace/ || exit 1
env
cmake --preset=ci-dev-asan-qtwidgets-qt6 -DCMAKE_PREFIX_PATH=/Qt6 && cd build-ci-dev-asan-qtwidgets-qt6/ && ninja && ctest -j4 --output-on-failure && cd .. &&
cmake --preset=ci-dev-asan-qtquick-qt6 -DCMAKE_PREFIX_PATH=/Qt6 && cd build-ci-dev-asan-qtquick-qt6/ && ninja && ctest -j4 --output-on-failure

View File

@@ -0,0 +1,59 @@
# 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: Nightly ASAN Qt5
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
preset:
- name: ci-dev-asan-qt5
qt_version: "5.15"
steps:
- name: Install Qt ${{ matrix.preset.qt_version }}
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.preset.qt_version }}
cache: true
- name: Install dependencies on Ubuntu
run: |
sudo apt update -qq
sudo apt install lld libspdlog-dev ninja-build -y
- name: Checkout sources
uses: actions/checkout@v4
- name: Configure project
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
- name: Build Project ${{ matrix.preset.build_preset_arg }}
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}
- name: Fix ASAN on ubuntu 22.04
run: |
sudo sysctl vm.mmap_rnd_bits=28
sudo sysctl vm.mmap_rnd_compat_bits=8
- name: Run tests on Linux (offscreen)
run: ctest --test-dir ./build-${{ matrix.preset.name }} --output-on-failure
env:
QT_QPA_PLATFORM: offscreen
QT_QUICK_BACKEND: software
LSAN_OPTIONS: detect_leaks=0
- name: Read tests log when it fails
uses: andstor/file-reader-action@v1
if: ${{ failure() && startsWith(matrix.preset.name, 'ci-dev-') }}
with:
path: "./build-${{ matrix.preset.name }}/Testing/Temporary/LastTest.log"

View File

@@ -0,0 +1,124 @@
# 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: CI
on:
push:
paths-ignore:
# These are built by another workflow
- src/flutter/**
- tests/flutter/**
- examples/flutter/**
- tests/reference-images/**
- .github/workflows/create_release.yml
- .github/workflows/examples.yml
branches:
- main
- 2.2
pull_request:
branches:
- main
- 2.2
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-13
preset:
- name: ci-dev-qt5
qt_version: "5.15"
- name: ci-release-qt5
qt_version: "5.15"
- name: ci-qtwidgets-qt5
qt_version: "5.15"
- name: ci-qtquick-qt5
qt_version: "5.15"
- name: ci-dev-qt6
qt_version: "6.3.*"
- 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.*"
include:
- os: ubuntu-latest
preset:
name: ci-python-qt6
qt_version: "6.6.0"
detect_leaks: 0
apt_pgks:
- llvm
pip_pgks:
- shiboken6-generator==6.6.0 pyside6==6.6.0
steps:
- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion
uses: jurplel/install-qt-action@v3
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 Python dependencies (${{ join(matrix.preset.pip_pgks, ' ') }})
if: ${{ matrix.preset.pip_pgks }}
run: echo ${{ join(matrix.preset.pip_pgks, ' ') }} | xargs pip install
- 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: 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
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
- name: Read tests log when it fails
uses: andstor/file-reader-action@v1
if: ${{ failure() && startsWith(matrix.preset.name, 'ci-dev-') }}
with:
path: "./build-${{ matrix.preset.name }}/Testing/Temporary/LastTest.log"

View File

@@ -0,0 +1,48 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: Create release
on:
workflow_dispatch:
inputs:
sha1:
type: string
required: true
description: "sha1 to be tagged"
version:
type: string
required: true
description: "Desired numeric version (without any prefix/suffix)"
permissions:
contents: write
actions: write
jobs:
create_release:
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout CI tools
uses: actions/checkout@v4
with:
repository: KDABLabs/ci-release-tools
path: ci-release-tools
ref: main
- name: Setup git author name
run: |
git config --global user.email "github_actions@kdab"
git config --global user.name "KDAB GitHub Actions"
- name: Create release
run: |
python3 ci-release-tools/src/create_release.py --repo KDDockWidgets --version ${{ github.event.inputs.version }} --sha1 ${{ github.event.inputs.sha1 }} --repo-path .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,83 @@
# 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: Examples and installed headers
on:
push:
branches:
- main
- 2.2
paths-ignore:
- .github/workflows/create_release.yml
pull_request:
branches:
- main
- 2.2
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-22.04
- windows-2022
- macos-13
preset:
- release
- ci-release-static-qt5
steps:
- name: Install Qt 5.15 with options and default aqtversion
uses: jurplel/install-qt-action@v3
with:
version: 5.15
cache: true
- name: Make sure MSVC is found when Ninja generator is in use
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Install lld linker
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update -qq
sudo apt install lld -y
- name: Checkout sources
uses: actions/checkout@v4
- name: Install ninja
uses: turtlesec-no/get-ninja@main
- name: Configure
run: cmake --preset=${{ matrix.preset }} -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/installed/ -DKDDockWidgets_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Debug
- name: Build
run: cmake --build build-${{ matrix.preset }} --parallel
- name: Install
run: cmake --install build-${{ matrix.preset }}
- name: Build examples
run: |
cd examples
cmake -G Ninja -S dockwidgets/ -B dockwidgets/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S mdi/ -B mdi/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S minimal/ -B minimal/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S mdi_with_docking/ -B mdi_with_docking/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S qtquick/dockwidgets/ -B qtquick/dockwidgets/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S qtquick/customseparator/ -B qtquick/customseparator/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S qtquick/customtabbar/ -B qtquick/customtabbar/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S qtquick/customtitlebar/ -B qtquick/customtitlebar/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake -G Ninja -S qtquick/mdi/ -B qtquick/mdi/b -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed/
cmake --build dockwidgets/b
cmake --build mdi/b
cmake --build minimal/b
cmake --build mdi_with_docking/b
cmake --build qtquick/dockwidgets/b
cmake --build qtquick/customseparator/b
cmake --build qtquick/customtabbar/b
cmake --build qtquick/mdi/b

View File

@@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 2024 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 against external nlohmann and KDBindings
on:
push:
branches:
- main
- 2.2
pull_request:
branches:
- main
- 2.2
jobs:
build:
runs-on: macos-13
steps:
- name: Install Qt 6.7.2
uses: jurplel/install-qt-action@v3
with:
version: 6.7.2
cache: true
- name: Install Dependencies
run: |
brew install nlohmann-json
brew tap KDAB/tap
brew install KDBindings
- name: Checkout sources
uses: actions/checkout@v4
# deleting 3rdparty is an easy way to make sure external worked
- name: Delete internal 3rdparty
run: |
rm -rf src/3rdparty/nlohmann/
rm -rf src/3rdparty/kdbindings/
- name: Configure
run: cmake -S . --preset dev6 -DKDDockWidgets_WERROR=OFF
- name: Build
run: cmake --build ./build-dev6
- name: Run tests on macOS
run: ctest --test-dir ./build-dev6 --verbose

View File

@@ -0,0 +1,106 @@
# 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
# Builds the flutter frontend and runs tests
name: Flutter-dev
on:
push:
branches:
- main
- 2.2
paths-ignore:
- .github/workflows/create_release.yml
- .github/workflows/examples.yml
pull_request:
branches:
- main
- 2.2
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
preset:
- name: dev-flutter
isAOT: false
args: []
# - name: dev-flutter-asan
# isAOT: false
# args: ["--asan"]
# - name: dev-flutter-aot
# isAOT: true
# args: ["--aot"]
# - name: dev-flutter-aot-asan
# isAOT: true
# args: ["--aot", "--asan"]
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.PAT_KDDW_REFERENCE_SCREENSHOTS }}
- name: Install dependencies on Ubuntu
run: |
sudo apt update -qq
sudo apt install libgtk-3-dev libglib2.0-dev ninja-build libspdlog-dev lld xvfb -y
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: "stable"
- name: Configure project ${{ matrix.preset.name }}
run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}
- name: Build Project ${{ matrix.preset.name }}
run: cmake --build ./build-${{ matrix.preset.name }}
- name: Build the example
run: |
cd examples/flutter
flutter build linux
- name: Run tests
run: |
cd ${{ github.workspace }}/src/flutter/dart
flutter pub get
flutter test
env:
KDDW_BINDINGS_LIB: ${{ github.workspace }}/build-dev-flutter/lib/libkddockwidgets.so
- name: Setup git author name
run: |
git config --global user.email "kddw@actions"
git config --global user.name "KDDW Actions"
# the reference is always latest main, as submodule sha1 might be lagging
# as it's updated nightly
- name: checkout latest main of ref images
run: |
cd tests/reference-images
git checkout main
- name: Run integration tests
run: |
cd tests/flutter/
flutter pub get
xvfb-run flutter test -d linux integration_test/ui_test.dart
env:
KDDW_BINDINGS_LIB: ${{ github.workspace }}/build-dev-flutter/lib/libkddockwidgets.so
- name: Compare against reference images
shell: bash
if: github.event_name == 'pull_request'
run: |
./tests/reference-images/compare_images.sh
env:
PAT: ${{ secrets.PAT_KDDW_REFERENCE_SCREENSHOTS }}
GITHUB_EVENT_PATH: ${{ github.event_path }}
GH_TOKEN: ${{ github.token }}

View File

@@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
# On demand flutter action to trigger flutter pub upgrade
name: (Scheduled) Runs flutter pub upgrade
on:
schedule:
- cron: "0 0 1 * *" # monthly
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: "main" # always main branch
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install wget curl file unzip zip xz-utils -y
- name: Install Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: "stable"
- name: Setup git author name
uses: fregante/setup-git-user@v2
- name: pub upgrade on examples
run: |
cd examples/flutter
flutter pub upgrade --major-versions
- name: pub upgrade on src/flutter/dart
run: |
cd src/flutter/dart
flutter pub upgrade --major-versions
- name: Create PR
run: sh src/flutter/create_pub_upgrade_pr.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,42 @@
# 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: Nighly bump tests/reference-images submodule
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Setup git author name
run: |
git config --global user.email "kddw@actions"
git config --global user.name "KDDW Actions"
- name: bump submodule
run: |
cd tests/reference-images/
git checkout main
cd ../..
git add tests/reference-images/
if [ -n "$(git status --porcelain)" ]; then
BRANCH_NAME=update/ref-images/`git rev-parse HEAD`
git checkout -B $BRANCH_NAME
git commit -m "Bump tests/reference-images/"
git push origin $BRANCH_NAME
gh pr create --base main --title "Bump tests/reference-images/" --body "Automatically created via GH actions."
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,74 @@
# 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
# Builds the flutter frontend
name: Flutter-rel
on:
push:
branches:
- main
- 2.2
paths-ignore:
- .github/workflows/create_release.yml
pull_request:
branches:
- main
- 2.2
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-13
preset:
- name: release-flutter
include:
- os: ubuntu-latest
flutter_os: "linux"
- os: windows-latest
flutter_os: "windows"
- os: macos-13
flutter_os: "macos"
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install dependencies on Ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update -qq
sudo apt install libgtk-3-dev libglib2.0-dev -y
- name: Install ninja
uses: turtlesec-no/get-ninja@main
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.x"
channel: "stable"
- name: MSVC into PATH
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 }}
- name: Build Project ${{ matrix.preset.build_preset_arg }}
run: cmake --build ./build-${{ matrix.preset.name }}
- name: Build the example
run: |
cd examples/flutter
flutter build ${{ matrix.os.flutter_os }}

View File

@@ -0,0 +1,44 @@
# 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: Layouting library
on:
push:
branches:
- main
- 2.2
paths-ignore:
- .github/workflows/create_release.yml
pull_request:
branches:
- main
- 2.2
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-22.04
- windows-2022
- macos-13
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install ninja
uses: turtlesec-no/get-ninja@main
- name: Make sure MSVC is found when Ninja generator is in use
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
run: cmake --preset=dev-none
- name: Build from top-level
run: cmake --build build-dev-none --parallel

View File

@@ -0,0 +1,61 @@
name: Deploy mdBook site to Pages
on:
push:
branches: ["main"]
paths-ignore:
- .github/workflows/create_release.yml
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.21
steps:
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- uses: actions/checkout@v4
- name: Install mdBook
run: |
cargo install --version ${MDBOOK_VERSION} mdbook
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with mdBook
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./book
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

View File

@@ -0,0 +1,104 @@
# 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: Nightly Misc
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-22.04
- windows-2022
- windows-2019
- macos-13
preset:
- name: ci-release-static-qt5
qt_version: "5.15"
- name: ci-dev-static-qt5
qt_version: "5.15"
- name: ci-python-qt6
qt_version: "6.6.0"
- name: ci-release-static-qt6
qt_version: "6.3.*"
- name: ci-dev-static-qt6
qt_version: "6.3.*"
include:
- os: ubuntu-22.04
preset:
name: ci-clang-tidy-qt6
qt_version: "6.3.*"
- os: ubuntu-22.04
preset:
name: clazy
build_preset_arg: '--preset=clazy'
qt_version: "5.15"
- os: ubuntu-22.04
preset:
name: ci-dev-valgrind-qt5
qt_version: "5.15"
- os: ubuntu-22.04
preset:
name: ci-dev-valgrind-qt6
qt_version: "6.5.*"
steps:
- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.preset.qt_version }}
cache: true
- name: Install ninja-build tool (must be after Qt due PATH changes)
uses: turtlesec-no/get-ninja@main
- name: Install dependencies on Ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update -qq
sudo apt install libspdlog-dev lld valgrind clazy llvm -y
- uses: actions/checkout@v4
#with:
#ref: '2.0' # schedule.cron do not allow branch setting
- uses: actions/setup-python@v5
with:
cache: 'pip'
cache-dependency-path: '.github/workflows/pip-requirements.txt'
python-version: '3.9'
- run: pip3.9 install -r .github/workflows/pip-requirements.txt
- 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 }}
# python on windows-2022 has a msvc problem
- name: Build Project ${{ matrix.preset.build_preset_arg }}
if: ${{ matrix.os != 'windows-2022' || matrix.preset.name != 'ci-python-qt6' }}
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}
- name: Run tests on Linux (offscreen)
if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os == 'Linux' }}
run: ctest --test-dir ./build-${{ matrix.preset.name }} --output-on-failure
env:
QT_QPA_PLATFORM: offscreen
QT_QUICK_BACKEND: software

View File

@@ -0,0 +1,2 @@
shiboken6-generator == 6.6.0
pyside6 == 6.6.0

View File

@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: pre-commit
on:
pull_request:
push:
branches:
- main
- 2.2
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.1

View File

@@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: Nightly Qt6 ASAN build
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/qt6-asan

View File

@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: Nightly Qt6 LSAN build
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/qt6-lsan

View File

@@ -0,0 +1,80 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: Nightly 3rdparty update
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-24.04
steps:
- name: Install dependencies on Ubuntu
run: |
sudo apt update -qq
sudo apt install rsync -y
- name: Checkout KDDW
uses: actions/checkout@v4
- name: Checkout KDBindings
uses: actions/checkout@v4
with:
repository: KDAB/KDBindings
path: KDBindings
ref: main
- name: Checkout ci-release-tools
uses: actions/checkout@v4
with:
repository: KDABLabs/ci-release-tools
path: ci-release-tools
ref: main
- name: setup author
run: |
git config --global user.email "@"
git config --global user.name "update-3rdparty (via Github Actions)"
- name: sync KDBindings
run: |
rsync -av --delete --exclude sha1.txt ./KDBindings/src/kdbindings/ src/3rdparty/kdbindings/
rm src/3rdparty/kdbindings/CMakeLists.txt
if git diff --quiet src/3rdparty/kdbindings ; then
exit 0
fi
(cd KDBindings/ && git rev-parse HEAD) > src/3rdparty/kdbindings/sha1.txt
NEW_BRANCH_NAME=work/bump_kdbindings_`cat src/3rdparty/kdbindings/sha1.txt`
cat src/3rdparty/kdbindings/sha1.txt
git checkout -B ${NEW_BRANCH_NAME}
git add src/3rdparty/kdbindings/
git commit -m "Bump 3rdparty/kdbindings"
git push origin ${NEW_BRANCH_NAME}
gh pr create --title "Bump 3rdparty/kdbindings" -R KDAB/KDDockWidgets -B main -b "Bump 3rdparty/kdbindings"
env:
GH_TOKEN: ${{ github.token }}
- name: sync nlohmann
run: |
LATEST_NLOHMANN=`./ci-release-tools/src/gh_utils.py --get-latest-release=nlohmann/json`
NEW_BRANCH_NAME=work/bump_nlohmann_${LATEST_NLOHMANN}
wget https://github.com/nlohmann/json/releases/download/${LATEST_NLOHMANN}/json.hpp -O src/3rdparty/nlohmann/nlohmann/json.hpp
echo $LATEST_NLOHMANN > src/3rdparty/nlohmann/nlohmann/sha1.txt
git add src/3rdparty/nlohmann/nlohmann/
! git diff --staged --quiet || exit 0
git checkout -B ${NEW_BRANCH_NAME}
git add src/3rdparty/nlohmann/
git commit -m "Bump 3rdparty/nlohmann"
git push origin ${NEW_BRANCH_NAME}
gh pr create --title "Bump 3rdparty/nlohmann" -R KDAB/KDDockWidgets -B main -b "Bump 3rdparty/nlohmann"
env:
GH_TOKEN: ${{ github.token }}

View File

@@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
name: Valgrind qtwidgets_leak_test
on:
push:
paths-ignore:
# These are built by another workflow
- src/flutter/**
- tests/flutter/**
- examples/flutter/**
- tests/reference-images/**
- .github/workflows/create_release.yml
branches:
- main
- 2.2
pull_request:
branches:
- main
- 2.2
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
steps:
- name: Install Qt 6.6.0
uses: jurplel/install-qt-action@v3
with:
version: 6.6.0
cache: true
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install lld ninja-build libspdlog-dev valgrind -y
- name: Checkout sources
uses: actions/checkout@v4
- name: Configure
run: cmake --preset=dev6 -DKDDockWidgets_EXAMPLES=OFF
- name: Build
run: cmake --build build-dev6 --parallel
- name: Run valgrind
run: valgrind --leak-check=full --show-leak-kinds=all --gen-suppressions=all --error-exitcode=1 --exit-on-first-error=yes --suppressions=./valgrind.sup ./build-dev6/bin/qtwidgets_leak_test -platform offscreen