forked from KDAB/KDDockWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
373 changed files
with
19,772 additions
and
6,780 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,34 +14,25 @@ | |
|
||
# Instructions: | ||
# docker build -t kddw-tests . | ||
# docker run -it -v /data/sources/kddockwidgets/:/kddockwidgets/ -v ~/Qt/5.15.2/gcc_64/:/Qt5/ -v ~/Qt/6.6.0/gcc_64/:/Qt6/ --ulimit nofile=1024:4096 -u 1000:1000 kddw-tests | ||
# docker run -it -v /data/sources/kddockwidgets/:/kddockwidgets/ -v ~/Qt/5.15.2/gcc_64/:/Qt5/ -v ~/Qt/6.6.0/gcc_64/:/Qt6/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit nofile=1024:4096 -u 1000:1000 kddw-tests | ||
# cd /kddockwidgets/ | ||
# cmake --preset=dev | ||
# cd build-dev && ninja | ||
# QT_QUICK_BACKEND=software ctest -j12 | ||
|
||
FROM ubuntu:22.04 | ||
FROM ubuntu:24.04 | ||
MAINTAINER Sergio Martins ([email protected]) | ||
|
||
ENV TZ=Europe/Berlin | ||
ENV LC_CTYPE=C.UTF-8 | ||
ENV PATH=$PATH:/Qt5/bin/:/Qt6/bin/ | ||
ENV LD_LIBRARY_PATH=/Qt5/lib/:/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 \ | ||
RUN apt update -qq && 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 \ | ||
vim clang-tidy-14 valgrind pip libxslt-dev llvm -y | ||
|
||
RUN pip install shiboken6-generator==6.6.0 shiboken6==6.6.0 pyside6==6.6.0 | ||
|
||
RUN pip install --index-url=https://download.qt.io/official_releases/QtForPython \ | ||
--trusted-host download.qt.io shiboken2-generator==5.15.2.1 shiboken2==5.15.2.1 pyside2==5.15.2.1 | ||
|
||
RUN mkdir /home/user && \ | ||
groupadd -g 1000 defaultgroup && \ | ||
useradd -u 1000 -g defaultgroup user -m && chown -R user /home/user | ||
vim clang-tidy-14 valgrind pip libxslt-dev llvm libspdlog-dev clazy clang -y |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# This file is part of KDDockWidgets. | ||
# | ||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# Author: Sérgio Martins <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | ||
# | ||
# Contact KDAB at <[email protected]> for commercial licensing options. | ||
|
||
# A minimal Dockerfile that's able to build KDDW Python support | ||
|
||
# Instructions: | ||
# docker build -t kddw-python . | ||
# docker run -it -v /data/sources/kddockwidgets/:/kddockwidgets/ -v ~/Qt/5.15.2/gcc_64/:/Qt5/ -v ~/Qt/6.6.0/gcc_64/:/Qt6/ --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ulimit nofile=1024:4096 -u 1000:1000 kddw-python | ||
# cd /kddockwidgets/ | ||
|
||
FROM ubuntu:22.04 | ||
MAINTAINER Sergio Martins ([email protected]) | ||
|
||
ENV TZ=Europe/Berlin | ||
ENV LC_CTYPE=C.UTF-8 | ||
ENV PATH=$PATH:/Qt5/bin/:/Qt6/bin/ | ||
ENV LD_LIBRARY_PATH=/Qt5/lib/:/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 -qq && 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 \ | ||
vim clang-tidy-14 valgrind pip libxslt-dev llvm libspdlog-dev clazy clang -y | ||
|
||
RUN pip install shiboken6-generator==6.6.0 shiboken6==6.6.0 pyside6==6.6.0 | ||
|
||
RUN pip install --index-url=https://download.qt.io/official_releases/QtForPython \ | ||
--trusted-host download.qt.io shiboken2-generator==5.15.2.1 shiboken2==5.15.2.1 pyside2==5.15.2.1 | ||
|
||
RUN mkdir /home/user && \ | ||
groupadd -g 1000 defaultgroup && \ | ||
useradd -u 1000 -g defaultgroup user -m && chown -R user /home/user |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[*.sh] | ||
indent_style = space | ||
indent_size = 2 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# This file is part of KDDockWidgets. | ||
# | ||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# Author: Sérgio Martins <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | ||
# | ||
# Contact KDAB at <[email protected]> for commercial licensing options. | ||
|
||
# Dockerfile for qt6-asan GitHub Action | ||
|
||
FROM iamsergio/kddw-qt6-asan | ||
MAINTAINER Sergio Martins ([email protected]) | ||
|
||
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"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# | ||
# This file is part of KDDockWidgets. | ||
# | ||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# Author: Sérgio Martins <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | ||
# | ||
# Contact KDAB at <[email protected]> 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 ([email protected]) | ||
|
||
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/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# 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' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh -l | ||
|
||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# 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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# This file is part of KDDockWidgets. | ||
# | ||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# Author: Sérgio Martins <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | ||
# | ||
# Contact KDAB at <[email protected]> for commercial licensing options. | ||
|
||
# Dockerfile for qt6-asan GitHub Action | ||
|
||
FROM iamsergio/kddw-qt6-asan | ||
MAINTAINER Sergio Martins ([email protected]) | ||
|
||
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"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# 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' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh -l | ||
|
||
# SPDX-FileCopyrightText: 2024 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# 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 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# | ||
# 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" |
Oops, something went wrong.