From 2bc6c0e583c20fcba14628554dd4ce6b1ab306ad Mon Sep 17 00:00:00 2001 From: tenzap Date: Wed, 1 Feb 2023 08:52:58 +0100 Subject: [PATCH 1/7] github wf: linux: install qml6-module-qtcharts if required With some versions of qt6 on Debian/Ubuntu, qml6-module-qtcharts needs to be installed too. See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035792 --- .github/workflows/linux.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b19b1bcf..6221d765 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -45,7 +45,12 @@ jobs: sudo apt-get update -qq - name: Install build dependencies - run: set -x; sudo apt-get -y install build-essential cmake libairspy-dev libasound2-dev libfaad-dev libfftw3-dev libmp3lame-dev libmpg123-dev libpulse-dev libqt6opengl6-dev librtlsdr-dev libsoapysdr-dev qt6-base-dev qt6-declarative-dev qt6-multimedia-dev qt6-charts-dev + run: | + set -x + sudo apt-get -y install build-essential cmake libairspy-dev libasound2-dev libfaad-dev libfftw3-dev libmp3lame-dev libmpg123-dev libpulse-dev libqt6opengl6-dev librtlsdr-dev libsoapysdr-dev qt6-base-dev qt6-charts-dev qt6-declarative-dev qt6-multimedia-dev + if dpkg --compare-versions $(dpkg-query -W qt6-charts-dev | cut -d " " -f 2) lt 6.4.2-3; then + sudo apt-get -y install qml6-module-qtcharts + fi - name: Configure welle.io project run: | From c483fad628a9ed3e70ea1aebc3a60650021ddbb2 Mon Sep 17 00:00:00 2001 From: tenzap Date: Mon, 30 Jan 2023 20:42:04 +0100 Subject: [PATCH 2/7] github wf: android: build with Qt6.5.1 - build with Qt 6.5.1 - set that the Qt build uses custom install dir - use the now official QT_ANDROID_PATH_CMAKE_DIR_%abi - fix detection of QT_INSTALL_BINDIR dpkg -S could return 2 lines. One for bin/qmake, the other for bin/qmake6 --- .github/workflows/android.yml | 37 +++++++++++------------------------ 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 49d1fa10..7828188e 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -7,21 +7,6 @@ name: Android build # If you want to build welle.io for Android yourself and produce a Multi-ABI # APK or AAB you might encouter these issues: # -# - QTBUG-101353: this is already managed inside welle.io by making different -# calls depending on the Qt Version. -# -# These issues may get revealed if you need/choose to specify a QT_HOST_PATH -# and/or need to use QT_HOST_PATH_CMAKE_DIR -# - QTBUG-106394: Android Multi ABI honors only for first abi the flag -# -DQT_NO_PACKAGE_VERSION_CHECK=TRUE -# Fixed in 6.5.0 Beta1 -# - QTBUG-106616: androiddeployqt not found on MultiABI android build with -# custom install dir -# Suggested patch in bug report -# -# All fixes related to these QTBUGs have been backported into qt-android-6.3 -# but not necessarily in the official release of Qt of that version -# # MultiABI build is only available since Qt 6.3. If you use Qt 6.2, you must # build each ABI individually. # @@ -41,13 +26,13 @@ jobs: runs-on: ubuntu-22.04 env: QT_ANDROID_JOB_REPO: bullseye-backports - QT_ANDROID_JOB_ID: 3336222 # Qt6.4.0 + QT_ANDROID_JOB_ID: 4247878 # Qt6.5.1 + custom install dir #QT_ANDROID_JOB_REPO: testing #QT_ANDROID_JOB_ID: 3206460 # Qt6.3 android-buil with OS's Host Qt (=doesn't provide qt-android-X.Y-host) - QT_ANDROID_PACKAGE: qt-android-6.4 - QT_ANDROID_HOST_HAS_CUSTOM_INSTALL_DIR: false # relevant only when not using OS's host Qt + QT_ANDROID_PACKAGE: qt-android-6.5 + QT_ANDROID_HOST_HAS_CUSTOM_INSTALL_DIR: true # relevant only when not using OS's host Qt USE_OS_QT_AS_HOST: false USE_OS_QT_AS_HOST_FROM_TESTING: true @@ -140,12 +125,12 @@ jobs: PACKAGE_FOR_BUILD="$(echo "${PACKAGES_FOR_ABI}" | head -n1 )" && # Find the path to the bin folder (qmake, qt-cmake) - QT_INSTALL_BINDIR="$(dirname "$(dpkg -S "bin/qmake" | grep "$PACKAGE_FOR_BUILD" | cut -f 2 -d " ")")" + QT_INSTALL_BINDIR="$(dirname "$(dpkg -S "bin/qmake" | grep 'bin/qmake$' | grep "$PACKAGE_FOR_BUILD:" | cut -f 2 -d " ")")" echo "QT_INSTALL_BINDIR: $QT_INSTALL_BINDIR" && echo "QT_INSTALL_BINDIR=${QT_INSTALL_BINDIR}" >> $GITHUB_ENV - ##### Get the QT_PATH_ANDROID_ABI_$abi & QT_PATH_CMAKE_DIR_ANDROID_ABI_$abi + ##### Get the QT_PATH_ANDROID_ABI_$abi & QT_ANDROID_PATH_CMAKE_DIR_$abi for abi in $(echo "$QT_ANDROID_ABIS" | tr ';' ' '); do # Create arguments like: -DQT_PATH_ANDROID_ABI_arm64-v8a="/usr/lib/${QT_ANDROID_PACKAGE}-arm64-v8a" @@ -164,9 +149,9 @@ jobs: fi echo "QT_PATH_ANDROID_ABI_$abi=${QT_INSTALL_PREFIX}" >> $GITHUB_ENV - # Add QT_PATH_CMAKE_DIR_ANDROID_ABI_%abi% (useful when android-build uses custom install dir) See QTBUG-106533 + # Add QT_ANDROID_PATH_CMAKE_DIR_%abi% (useful when android-build uses custom install dir) See QTBUG-106533 QT_CMAKE_DIR="$(dirname "$(dirname "$(dpkg -S "qt.toolchain.cmake" | grep "${QT_ANDROID_PACKAGE}-${abi/x86_64/x86-64}:" | cut -f 2 -d " ")")")" - echo "QT_PATH_CMAKE_DIR_ANDROID_ABI_$abi=${QT_CMAKE_DIR}" >> $GITHUB_ENV + echo "QT_ANDROID_PATH_CMAKE_DIR_$abi=${QT_CMAKE_DIR}" >> $GITHUB_ENV done && @@ -291,10 +276,10 @@ jobs: -DQT_PATH_ANDROID_ABI_arm64-v8a="${{ env.QT_PATH_ANDROID_ABI_arm64-v8a }}" \ -DQT_PATH_ANDROID_ABI_x86="${{ env.QT_PATH_ANDROID_ABI_x86 }}" \ -DQT_PATH_ANDROID_ABI_x86_64="${{ env.QT_PATH_ANDROID_ABI_x86_64 }}" \ - -DQT_PATH_CMAKE_DIR_ANDROID_ABI_armeabi-v7a="${{ env.QT_PATH_CMAKE_DIR_ANDROID_ABI_armeabi-v7a }}" \ - -DQT_PATH_CMAKE_DIR_ANDROID_ABI_arm64-v8a="${{ env.QT_PATH_CMAKE_DIR_ANDROID_ABI_arm64-v8a }}" \ - -DQT_PATH_CMAKE_DIR_ANDROID_ABI_x86="${{ env.QT_PATH_CMAKE_DIR_ANDROID_ABI_x86 }}" \ - -DQT_PATH_CMAKE_DIR_ANDROID_ABI_x86_64="${{ env.QT_PATH_CMAKE_DIR_ANDROID_ABI_x86_64 }}" \ + -DQT_ANDROID_PATH_CMAKE_DIR_armeabi-v7a="${{ env.QT_ANDROID_PATH_CMAKE_DIR_armeabi-v7a }}" \ + -DQT_ANDROID_PATH_CMAKE_DIR_arm64-v8a="${{ env.QT_ANDROID_PATH_CMAKE_DIR_arm64-v8a }}" \ + -DQT_ANDROID_PATH_CMAKE_DIR_x86="${{ env.QT_ANDROID_PATH_CMAKE_DIR_x86 }}" \ + -DQT_ANDROID_PATH_CMAKE_DIR_x86_64="${{ env.QT_ANDROID_PATH_CMAKE_DIR_x86_64 }}" \ -DANDROID_SDK_ROOT=$MY_ANDROID_SDK_ROOT \ -DANDROID_NDK_ROOT=$MY_ANDROID_NDK_ROOT \ -DQT_ENABLE_VERBOSE_DEPLOYMENT=ON \ From dcb2cb67d34439464b93e0fb100d64ca196e9124 Mon Sep 17 00:00:00 2001 From: tenzap Date: Fri, 26 May 2023 09:58:15 +0200 Subject: [PATCH 3/7] github wf: android: enable verbose makefile, build with cmake --- .github/workflows/android.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 7828188e..25b7ca70 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -283,6 +283,7 @@ jobs: -DANDROID_SDK_ROOT=$MY_ANDROID_SDK_ROOT \ -DANDROID_NDK_ROOT=$MY_ANDROID_NDK_ROOT \ -DQT_ENABLE_VERBOSE_DEPLOYMENT=ON \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ "${ARGS[@]}" \ -S .. -B . @@ -290,9 +291,7 @@ jobs: id: build_apk run: | set -x - cd build - make VERBOSE=1 -j$(nproc) apk - cd .. + cmake --build "build" --parallel ls -al build/android-build/build/outputs/apk/debug/android-build-debug.apk - name: Upload to nightlies server From e1e6b548267d577e646728a0df88e791ad137fa6 Mon Sep 17 00:00:00 2001 From: tenzap Date: Fri, 26 May 2023 10:02:30 +0200 Subject: [PATCH 4/7] github wf: android: add build with qmake --- .github/workflows/android.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 25b7ca70..b264cbfc 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -303,14 +303,38 @@ jobs: sudo apt-get -y install sshpass sshpass -p "${SFTP_PASSWORD}" scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null build/android-build/build/outputs/apk/debug/android-build-debug.apk "${SFTP_USER}"@welle-io-nightlies.albrechtloh.de:/welle-io-nightlies.albrechtloh.de/${DATE}_${LAST_COMMIT_HASH}_Android_welle-io.apk + - name: Build with qmake + id: build_apk_qmake + run: | + set -x + echo $PWD + + mkdir -p qmake-build + cd qmake-build + ${QT_INSTALL_BINDIR}/qmake \ + ../welle.io.pro + + make V=1 apk + cd .. + + ls -al qmake-build/src/welle-gui/android-build/build/outputs/apk/debug/android-build-debug.apk + - name: Archive artifacts (welle.io apk) if: always() && steps.build_apk.outcome == 'success' uses: actions/upload-artifact@v2 with: - name: welle.io apk + name: welle.io apk (for all android abi) path: build/android-build/build/outputs/apk/debug/*.apk if-no-files-found: error + - name: Archive artifacts (welle.io apk built by qmake) + if: always() && steps.build_apk_qmake.outcome == 'success' + uses: actions/upload-artifact@v2 + with: + name: welle.io apk built by qmake (arm64-v8a only) + path: qmake-build/src/welle-gui/android-build/build/outputs/apk/debug/android-build-debug.apk + if-no-files-found: error + - name: Archive artifacts (welle.io build dir) if: always() && steps.build_apk.outcome == 'failure' uses: actions/upload-artifact@v2 From 42df052611bc7618b504d664e37fcf0cebe0bdc1 Mon Sep 17 00:00:00 2001 From: tenzap Date: Fri, 26 May 2023 10:28:11 +0200 Subject: [PATCH 5/7] github wf: android: use latest github actions to use node.js 16 This warning was reported: Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/upload-artifact@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. --- .github/workflows/android.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b264cbfc..0f82cdeb 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -47,7 +47,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - run: git fetch --prune --unshallow --tags @@ -321,7 +321,7 @@ jobs: - name: Archive artifacts (welle.io apk) if: always() && steps.build_apk.outcome == 'success' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: welle.io apk (for all android abi) path: build/android-build/build/outputs/apk/debug/*.apk @@ -329,7 +329,7 @@ jobs: - name: Archive artifacts (welle.io apk built by qmake) if: always() && steps.build_apk_qmake.outcome == 'success' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: welle.io apk built by qmake (arm64-v8a only) path: qmake-build/src/welle-gui/android-build/build/outputs/apk/debug/android-build-debug.apk @@ -337,7 +337,7 @@ jobs: - name: Archive artifacts (welle.io build dir) if: always() && steps.build_apk.outcome == 'failure' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: welle.io build dir path: build/* From b87b11163ce8893f7d4303e1ec966ea6d6006c39 Mon Sep 17 00:00:00 2001 From: tenzap Date: Fri, 26 May 2023 10:14:56 +0200 Subject: [PATCH 6/7] github wf: linux: use latest github actions to use node.js 16 --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6221d765..1fc22b3c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - run: git fetch --prune --unshallow --tags @@ -71,7 +71,7 @@ jobs: - name: Archive artifacts (welle.io build dir) if: always() && steps.build.outcome == 'failure' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: welle.io build dir path: build/* From 51cd22f1cd15674852238fd0db46b997399b5163 Mon Sep 17 00:00:00 2001 From: tenzap Date: Fri, 26 May 2023 10:44:18 +0200 Subject: [PATCH 7/7] github wf: linux: use lunar repo to get qt6-charts-dev --- .github/workflows/linux.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1fc22b3c..66f3d07f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -34,23 +34,26 @@ jobs: run: env | sort # qt6-charts-dev is not available in ubuntu 22.04, neither Debian bullseye. - # So we use the packages from Debian testing - - name: "Add Debian testing repo and required keys" + # So we use the packages from a newer repository + - name: "Add repo having qt6-charts-dev" run: | - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793 - sudo add-apt-repository "deb http://deb.debian.org/debian/ testing main" -y + if ! dpkg-query -W qt6-charts-dev; then + sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lunar main universe" -y # Update packages list sudo apt-get update -qq + fi - name: Install build dependencies run: | set -x sudo apt-get -y install build-essential cmake libairspy-dev libasound2-dev libfaad-dev libfftw3-dev libmp3lame-dev libmpg123-dev libpulse-dev libqt6opengl6-dev librtlsdr-dev libsoapysdr-dev qt6-base-dev qt6-charts-dev qt6-declarative-dev qt6-multimedia-dev + # Workarounds for packaging bugs if dpkg --compare-versions $(dpkg-query -W qt6-charts-dev | cut -d " " -f 2) lt 6.4.2-3; then sudo apt-get -y install qml6-module-qtcharts fi + if dpkg --compare-versions $(dpkg-query -W qt6-multimedia-dev | cut -d " " -f 2) lt 6.4.2-5; then + sudo apt-get -y install qml6-module-qtquick3d-spatialaudio + fi - name: Configure welle.io project run: |