Skip to content

Commit

Permalink
Fix qtzlib support for Qt6, add CI tests
Browse files Browse the repository at this point in the history
- add 3 docker images qith qt5 and qt6 static builds for usage in CI (#194)
- add Linux and Windows CI for qtzlib option
- fix qtzlib for Qt6, now links to both BundledZLIB (static lib) and ZlibPrivate (headers)
- fail fast if Qt zlib module is not found to prevent accidental linking to system zlib
  • Loading branch information
cen1 committed Apr 1, 2024
1 parent 1f7b928 commit 6063832
Show file tree
Hide file tree
Showing 9 changed files with 589 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .github/docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Minimal Qt build images for CI

These include minimal Qt built from source with `-qt-zlib` option to test `-DQUAZIP_USE_QT_ZLIB=ON` builds.

`jurplel/install-qt-action` is essentially a binary downloader from Qt and does not have all options available.
67 changes: 67 additions & 0 deletions .github/docker/qt-5.15.12-ubuntu-static/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
FROM ubuntu:22.04 as builder

WORKDIR /build

RUN apt-get -y update && apt-get -y install build-essential cmake tar wget python3

RUN wget -qO- https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.12/single/qt-everywhere-opensource-src-5.15.12.tar.xz | tar xJ

RUN qt-everywhere-src-5.15.12/configure -qt-zlib \
-static \
-opensource \
-confirm-license \
-optimize-size \
-nomake examples \
-nomake tests \
-no-dbus \
-no-fontconfig \
-no-opengl \
-no-openssl \
-no-gui \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdeclarative \
-skip qtdoc \
-skip qtactiveqt \
-skip qt3d \
-skip qtimageformats \
-skip qtlocation \
-skip qtmultimedia \
-skip qtopcua \
-skip qtremoteobjects \
-skip qtscxml \
-skip qtsensors \
-skip qtserialbus \
-skip qtserialport \
-skip qtspeech \
-skip qtsvg \
-skip qttools \
-skip qttranslations \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebsockets \
-skip qtwebview \
-skip qtcharts \
-skip qtcoap \
-skip qtlottie \
-skip qtmqtt \
-skip qtnetworkauth \
-skip qtquick3d \
-skip qtquicktimeline \
-skip qtvirtualkeyboard \
-skip qtwayland \
-skip qtcanvas3d \
-skip qtgamepad \
-skip qtpurchasing \
-skip qtscript

RUN make -j$(nproc) && make install

FROM ubuntu:22.04

RUN apt-get -y update && apt-get -y install git build-essential cmake

COPY --from=builder /usr/local/Qt-5.15.12 /usr/local/Qt-5.15.12

# Temporary workaround for https://github.com/stachenov/quazip/issues/127
ENV LC_ALL=C.UTF-8
72 changes: 72 additions & 0 deletions .github/docker/qt-6.4.3-ubuntu-static/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM ubuntu:22.04 AS builder

WORKDIR /build

RUN apt-get -y update && apt-get -y install build-essential cmake tar wget python3

RUN wget -qO- https://ftp.fau.de/qtproject/archive/qt/6.4/6.4.3/single/qt-everywhere-src-6.4.3.tar.xz | tar xJ

RUN qt-everywhere-src-6.4.3/configure -qt-zlib \
-static \
-opensource \
-confirm-license \
-optimize-size \
-nomake examples \
-nomake tests \
-no-dbus \
-no-fontconfig \
-no-opengl \
-no-openssl \
-no-gui \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdeclarative \
-skip qtdoc \
-skip qtactiveqt \
-skip qt3d \
-skip qtgraphs \
-skip qtgrpc \
-skip qtimageformats \
-skip qtlanguageserver \
-skip qtlocation \
-skip qthttpserver \
-skip qtmultimedia \
-skip qtopcua \
-skip qtpositioning \
-skip qtremoteobjects \
-skip qtscxml \
-skip qtsensors \
-skip qtserialbus \
-skip qtserialport \
-skip qtshadertools \
-skip qtspeech \
-skip qtsvg \
-skip qttools \
-skip qttranslations \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebsockets \
-skip qtwebview \
-skip qtcharts \
-skip qtcoap \
-skip qtlottie \
-skip qtmqtt \
-skip qtnetworkauth \
-skip qtquick3d \
-skip qtquick3dphysics \
-skip qtquickeffectmaker \
-skip qtquicktimeline \
-skip qtvirtualkeyboard \
-skip qtwayland \
-skip qtcanvas3d \
-skip qtgamepad \
-skip qtpurchasing \
-skip qtscript

RUN cmake --build . --parallel --target install

FROM ubuntu:22.04

RUN apt-get -y update && apt-get -y install build-essential cmake

COPY --from=builder /usr/local/Qt-6.4.3 /usr/local/Qt-6.4.3
72 changes: 72 additions & 0 deletions .github/docker/qt-6.6.2-ubuntu-static/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM ubuntu:22.04 as builder

WORKDIR /build

RUN apt-get -y update && apt-get -y install build-essential cmake tar wget python3

RUN wget -qO- https://ftp.fau.de/qtproject/archive/qt/6.6/6.6.2/single/qt-everywhere-src-6.6.2.tar.xz | tar xJ

RUN qt-everywhere-src-6.6.2/configure -qt-zlib \
-static \
-opensource \
-confirm-license \
-optimize-size \
-nomake examples \
-nomake tests \
-no-dbus \
-no-fontconfig \
-no-opengl \
-no-openssl \
-no-gui \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdeclarative \
-skip qtdoc \
-skip qtactiveqt \
-skip qt3d \
-skip qtgraphs \
-skip qtgrpc \
-skip qtimageformats \
-skip qtlanguageserver \
-skip qtlocation \
-skip qthttpserver \
-skip qtmultimedia \
-skip qtopcua \
-skip qtpositioning \
-skip qtremoteobjects \
-skip qtscxml \
-skip qtsensors \
-skip qtserialbus \
-skip qtserialport \
-skip qtshadertools \
-skip qtspeech \
-skip qtsvg \
-skip qttools \
-skip qttranslations \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebsockets \
-skip qtwebview \
-skip qtcharts \
-skip qtcoap \
-skip qtlottie \
-skip qtmqtt \
-skip qtnetworkauth \
-skip qtquick3d \
-skip qtquick3dphysics \
-skip qtquickeffectmaker \
-skip qtquicktimeline \
-skip qtvirtualkeyboard \
-skip qtwayland \
-skip qtcanvas3d \
-skip qtgamepad \
-skip qtpurchasing \
-skip qtscript

RUN cmake --build . --parallel --target install

FROM ubuntu:22.04

RUN apt-get -y update && apt-get -y install build-essential cmake

COPY --from=builder /usr/local/Qt-6.6.2 /usr/local/Qt-6.6.2
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions: read-all

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
# All aqt options: https://ddalcino.github.io/aqt-list-server/
BUILD_TYPE: Release

jobs:
Expand All @@ -22,7 +23,7 @@ jobs:
fail-fast: false
matrix:
ubuntu_version: [20.04, 22.04]
qt_version: [5.12.12, 5.15.2, 6.4.0]
qt_version: [5.12.12, 5.15.2, 6.6.2]
shared: [ON, OFF]

steps:
Expand Down Expand Up @@ -111,7 +112,7 @@ jobs:
fail-fast: false
matrix:
macos_version: [11, 12]
qt_version: [5.15.2, 6.4.0]
qt_version: [5.15.2, 6.6.2]
shared: [ON, OFF]

steps:
Expand Down
Loading

0 comments on commit 6063832

Please sign in to comment.