From 57517b72920ebe0a60be12703199756c62f8c540 Mon Sep 17 00:00:00 2001 From: t0b3 Date: Sun, 24 Mar 2024 11:12:54 +0100 Subject: [PATCH 1/2] fix: build without qtserialport closes: https://github.com/qgis/QGIS/issues/56944 Signed-off-by: t0b3 --- python/PyQt6/core/core.sip.in | 19 +++++++++++-------- python/core/core.sip.in | 17 ++++++++++------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/python/PyQt6/core/core.sip.in b/python/PyQt6/core/core.sip.in index a9a7b7a95325..165aaa4ecbb6 100644 --- a/python/PyQt6/core/core.sip.in +++ b/python/PyQt6/core/core.sip.in @@ -91,6 +91,14 @@ done: %End +%Feature HAVE_GUI +%Feature HAVE_QTSERIALPORT +%Feature HAVE_QTPRINTER +%Feature ANDROID +%Feature VECTOR_MAPPED_TYPE +%Feature HAVE_WEBENGINE_SIP +%Feature PYQT6 + %Import QtXml/QtXmlmod.sip %Import QtNetwork/QtNetworkmod.sip %Import QtSql/QtSqlmod.sip @@ -98,15 +106,10 @@ done: %Import QtPrintSupport/QtPrintSupportmod.sip %Import QtWidgets/QtWidgetsmod.sip %Import QtPositioning/QtPositioningmod.sip -%Import QtSerialPort/QtSerialPortmod.sip -%Feature HAVE_GUI -%Feature HAVE_QTSERIALPORT -%Feature HAVE_QTPRINTER -%Feature ANDROID -%Feature VECTOR_MAPPED_TYPE -%Feature HAVE_WEBENGINE_SIP -%Feature PYQT6 +%If (HAVE_QTSERIALPORT) +%Import QtSerialPort/QtSerialPortmod.sip +%End %Include conversions.sip %Include qgsexception.sip diff --git a/python/core/core.sip.in b/python/core/core.sip.in index 10c6ff3f4c5c..8378dd455203 100644 --- a/python/core/core.sip.in +++ b/python/core/core.sip.in @@ -91,6 +91,13 @@ done: %End +%Feature HAVE_GUI +%Feature HAVE_QTSERIALPORT +%Feature HAVE_QTPRINTER +%Feature ANDROID +%Feature VECTOR_MAPPED_TYPE +%Feature HAVE_WEBENGINE_SIP + %Import QtXml/QtXmlmod.sip %Import QtNetwork/QtNetworkmod.sip %Import QtSql/QtSqlmod.sip @@ -98,14 +105,10 @@ done: %Import QtPrintSupport/QtPrintSupportmod.sip %Import QtWidgets/QtWidgetsmod.sip %Import QtPositioning/QtPositioningmod.sip -%Import QtSerialPort/QtSerialPortmod.sip -%Feature HAVE_GUI -%Feature HAVE_QTSERIALPORT -%Feature HAVE_QTPRINTER -%Feature ANDROID -%Feature VECTOR_MAPPED_TYPE -%Feature HAVE_WEBENGINE_SIP +%If (HAVE_QTSERIALPORT) +%Import QtSerialPort/QtSerialPortmod.sip +%End %Include conversions.sip %Include qgsexception.sip From 27e8f96d16662d5aa4a7518b83de97806c665108 Mon Sep 17 00:00:00 2001 From: t0b3 Date: Sun, 24 Mar 2024 11:08:08 +0100 Subject: [PATCH 2/2] fix: push docker image only if GH actor == qgis Signed-off-by: t0b3 --- .github/workflows/run-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 85278b3bad8e..ea22106c714e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -116,7 +116,7 @@ jobs: echo QT_VERSION: ${QT_VERSION} - name: Login to Docker Hub - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.actor == 'qgis' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -129,7 +129,7 @@ jobs: context: . file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile tags: qgis/qgis3-build-deps-${{ matrix.distro-version }}-qt${{ matrix.qt-version }}:${{ github.event.pull_request.base.ref || github.ref_name }} - push: ${{ github.event_name == 'push' }} + push: ${{ github.event_name == 'push' && github.actor == 'qgis' }} pull: true build-args: DISTRO_VERSION=${{ matrix.distro-version }} @@ -347,7 +347,7 @@ jobs: echo CTEST_BUILD_NAME: ${CTEST_BUILD_NAME} - name: Login to Docker Hub - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.actor == 'qgis' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -360,7 +360,7 @@ jobs: context: . file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile tags: qgis/qgis3-qt${{ matrix.qt-version }}-build-deps-bin-only:${{ github.event.pull_request.base.ref || github.ref_name }} - push: ${{ github.event_name == 'push' }} + push: ${{ github.event_name == 'push' && github.actor == 'qgis' }} pull: true target: ${{ matrix.docker-target }} build-args: @@ -458,7 +458,7 @@ jobs: fetch-depth: 2 - name: Login to Docker Hub - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.actor == 'qgis' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -471,7 +471,7 @@ jobs: context: . file: .docker/qgis3-qt${{ matrix.qt-version }}-build-deps.dockerfile tags: qgis/qgis3-qt${{ matrix.qt-version }}-build-deps-bin-only:${{ github.event.pull_request.base.ref || github.ref_name }} - push: ${{ github.event_name == 'push' }} + push: ${{ github.event_name == 'push' && github.actor == 'qgis' }} pull: true target: ${{ matrix.docker-target }} build-args: