First Commit
This commit is contained in:
22
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile
vendored
Normal file
22
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile
vendored
Normal 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"]
|
||||
73
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile_qtasan
vendored
Normal file
73
3rdparty/kddockwidgets/.github/actions/qt6-asan/Dockerfile_qtasan
vendored
Normal 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/
|
||||
4
3rdparty/kddockwidgets/.github/actions/qt6-asan/README.md
vendored
Normal file
4
3rdparty/kddockwidgets/.github/actions/qt6-asan/README.md
vendored
Normal 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.
|
||||
9
3rdparty/kddockwidgets/.github/actions/qt6-asan/action.yml
vendored
Normal file
9
3rdparty/kddockwidgets/.github/actions/qt6-asan/action.yml
vendored
Normal 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'
|
||||
8
3rdparty/kddockwidgets/.github/actions/qt6-asan/entrypoint.sh
vendored
Executable file
8
3rdparty/kddockwidgets/.github/actions/qt6-asan/entrypoint.sh
vendored
Executable 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
|
||||
Reference in New Issue
Block a user