From a286c38693a44732d1c46225e3f1a27ab3353835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C5=99=C3=ADza?= Date: Wed, 17 Apr 2024 18:25:13 +0200 Subject: [PATCH] Update dependencies in CI and CMake Qt 6.7.2 (except WASM) Qt 6.6.3 (WASM) qcoro 0.10.0 qtkeychain 0.14.3 hopefully updated all github actions to versions that won't expire any time soon --- .github/workflows/codeql.yml | 15 ++++---- .github/workflows/main.yml | 75 ++++++++++++++++++------------------ CMakeLists.txt | 8 ++-- dist/android/build.sh | 6 +-- dist/ios/build.sh | 4 +- dist/macos/build.sh | 2 +- dist/wasm/build.sh | 6 +-- 7 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f50c260..d7a50a3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -18,9 +18,8 @@ on: branches: [ "master" ] env: - QT_VERSION: '6.6.3' + QT_VERSION: '6.7.2' QT_MODULES: 'qtmultimedia qtwebsockets qtimageformats' - EM_VERSION: '3.1.37' jobs: analyze: @@ -48,7 +47,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Make run: | @@ -57,7 +56,7 @@ jobs: - name: Set up CPM cache id: cache-cpm - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/cpm-cache key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }} @@ -65,7 +64,7 @@ jobs: ${{ runner.os }}-cpm- - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} modules: ${{env.QT_MODULES}} @@ -74,7 +73,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -94,7 +93,7 @@ jobs: mkdir build cd build export CPM_SOURCE_CACHE=~/cpm-cache - export CMAKE_PREFIX_PATH="$Qt6_DIR"/lib/cmake + export CMAKE_PREFIX_PATH="$QT_ROOT_DIR"/lib/cmake cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} -DLITH_FORCE_DOWNLOAD_DEPENDENCIES=ON make -j5 @@ -109,6 +108,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b801fc8..5a3c434 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,9 +7,10 @@ on: create: env: - QT_VERSION: '6.6.3' + QT_VERSION: '6.7.2' QT_MODULES: 'qtmultimedia qtwebsockets qtimageformats' - EM_VERSION: '3.1.37' + WASM_QT_VERSION: '6.6.3' + EM_VERSION: '3.1.25' permissions: contents: write @@ -59,7 +60,7 @@ jobs: - name: Set up CPM cache id: cache-cpm - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/cpm-cache key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }} @@ -67,7 +68,7 @@ jobs: ${{ runner.os }}-cpm- - name: Install Host Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} set-env: false @@ -75,7 +76,7 @@ jobs: cache: true cache-key-prefix: ${{ github.job }}-qt-host - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} target: ios @@ -90,7 +91,7 @@ jobs: IMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} bash ./dist/ios/build.sh - name: Upload artifacts to GitHub if: github.event_name != 'create' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Lith.ipa path: build_ios/Lith.ipa @@ -119,7 +120,7 @@ jobs: - name: Set up CPM cache id: cache-cpm - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/cpm-cache key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }} @@ -127,16 +128,16 @@ jobs: ${{ runner.os }}-cpm- - name: Install Host Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} host: linux set-env: false modules: ${{env.QT_MODULES}} cache: true - cache-key-prefix: ${{ github.job }}-qt-host + cache-key-prefix: ${{ github.job }}-qt-${{ env.QT_VERSION }} - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} host: linux @@ -144,7 +145,7 @@ jobs: arch: android_armv7 modules: ${{env.QT_MODULES}} cache: true - cache-key-prefix: ${{ github.job }}-qt + cache-key-prefix: ${{ github.job }}-qt-cross-${{ env.QT_VERSION }} - name: Get OpenSSL run: | @@ -160,7 +161,7 @@ jobs: IMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} bash ./dist/android/build.sh - name: Upload artifacts to GitHub if: github.event_name != 'create' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: android-build-debug.apk path: build_android/app/android-build/Lith.apk @@ -181,7 +182,7 @@ jobs: - name: Set up CPM cache id: cache-cpm - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/cpm-cache key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }} @@ -189,24 +190,24 @@ jobs: ${{ runner.os }}-cpm- - name: Install Host Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: - version: ${{env.QT_VERSION}} + version: ${{env.WASM_QT_VERSION}} set-env: false cache: true - cache-key-prefix: ${{ github.job }}-qt-host + cache-key-prefix: ${{ github.job }}-qt-${{ env.QT_VERSION }} - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: - version: ${{env.QT_VERSION}} + version: ${{env.WASM_QT_VERSION}} host: linux target: desktop arch: wasm_singlethread modules: ${{env.QT_MODULES}} cache: true - cache-key-prefix: ${{ github.job }}-qt + cache-key-prefix: ${{ github.job }}-qt-cross-${{ env.QT_VERSION }} - - uses: mymindstorm/setup-emsdk@v11 + - uses: mymindstorm/setup-emsdk@v14 with: version: ${{env.EM_VERSION}} @@ -223,13 +224,13 @@ jobs: uses: actions/configure-pages@v3 - name: Upload artifact if: github.event_name == 'create' - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: 'installed/' - name: Deploy to GitHub Pages id: deployment if: github.event_name == 'create' - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 Windows-MSVC: runs-on: windows-2019 @@ -240,7 +241,7 @@ jobs: - name: Set up CPM cache id: cache-cpm - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/cpm-cache key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }} @@ -248,7 +249,7 @@ jobs: ${{ runner.os }}-cpm- - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} modules: ${{env.QT_MODULES}} @@ -256,7 +257,7 @@ jobs: cache-key-prefix: ${{ github.job }}-qt - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v2 - name: Build the application shell: bash run: | @@ -265,7 +266,7 @@ jobs: mkdir build_win cd build_win export CPM_SOURCE_CACHE=~/cpm-cache - export CMAKE_PREFIX_PATH="$Qt6_DIR"/lib/cmake + export CMAKE_PREFIX_PATH="$QT_ROOT_DIR"/lib/cmake cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} -DVERSION=$VERSION_NAME cmake --build . --config Release cmake --install . --config Release @@ -276,11 +277,11 @@ jobs: cp build_win/installed/bin/* build_win/composed cp -r build_win/installed/lib/modules build_win/composed/ cd build_win/composed - "$Qt6_DIR"/bin/windeployqt.exe Lith.exe LithCore.dll LithStyle.dll LithUI.dll --verbose 2 --release --compiler-runtime --qmldir ../.. + "$QT_ROOT_DIR"/bin/windeployqt.exe Lith.exe LithCore.dll LithStyle.dll LithUI.dll --verbose 2 --release --compiler-runtime --qmldir ../.. 7z a ../../Lith.zip * - name: Upload artifacts to GitHub if: github.event_name != 'create' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Lith.zip path: Lith.zip @@ -308,7 +309,7 @@ jobs: - name: Set up CPM cache id: cache-cpm - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/cpm-cache key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }} @@ -316,7 +317,7 @@ jobs: ${{ runner.os }}-cpm- - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} modules: ${{env.QT_MODULES}} @@ -329,7 +330,7 @@ jobs: cd build export CPM_SOURCE_CACHE=~/cpm-cache export VERSION_NAME=$(./dist/get-version-name.sh) - export CMAKE_PREFIX_PATH="$Qt6_DIR"/lib/cmake + export CMAKE_PREFIX_PATH="$QT_ROOT_DIR"/lib/cmake cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=${{ secrets.IMGUR_API_KEY }} -DVERSION=$VERSION_NAME -DLITH_FORCE_DOWNLOAD_DEPENDENCIES=ON make -j5 @@ -350,7 +351,7 @@ jobs: manifest-path: "dist/linux/flatpak/app.Lith.Lith.json" - name: Upload artifacts to GitHub if: github.event_name != 'create' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: app.Lith.Lith.flatpak path: app.Lith.Lith.flatpak @@ -397,7 +398,7 @@ jobs: - name: Set up CPM cache id: cache-cpm - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/cpm-cache key: ${{ runner.os }}-cpm-${{ hashFiles('CMakeLists.txt') }} @@ -405,7 +406,7 @@ jobs: ${{ runner.os }}-cpm- - name: Install Qt - uses: jurplel/install-qt-action@v3 + uses: jurplel/install-qt-action@v4 with: version: ${{env.QT_VERSION}} modules: ${{env.QT_MODULES}} @@ -422,13 +423,13 @@ jobs: # A workaround mentioned here https://github.com/actions/runner-images/issues/7522 echo killing...; sudo pkill -9 XProtect >/dev/null || true; echo waiting...; while pgrep XProtect; do sleep 3; done; - "$Qt6_DIR"/bin/macdeployqt build_macos/app/Lith.app -qmldir=modules -appstore-compliant #-codesign=Z52EFCPL6D + "$QT_ROOT_DIR"/bin/macdeployqt build_macos/app/Lith.app -qmldir=modules -appstore-compliant #-codesign=Z52EFCPL6D # No idea why but macdeployqt deploys debug libs too, just remove them, maybe fix this sometimes for i in `find build_macos/app/Lith.app/ -name '*.dSYM'`; do rm -fr "$i"; done - "$Qt6_DIR"/bin/macdeployqt build_macos/app/Lith.app -no-plugins -dmg -always-overwrite -appstore-compliant + "$QT_ROOT_DIR"/bin/macdeployqt build_macos/app/Lith.app -no-plugins -dmg -always-overwrite -appstore-compliant - name: Upload artifacts to GitHub if: github.event_name != 'create' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Lith.dmg path: build_macos/app/Lith.dmg diff --git a/CMakeLists.txt b/CMakeLists.txt index cbbdc23..e0cecf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,7 +135,8 @@ if(LITH_DEPENDENCY_ENABLE_KEYCHAIN) CPMAddPackage( NAME Qt6Keychain GIT_REPOSITORY https://github.com/frankosterfeld/qtkeychain.git - GIT_TAG 0.14.1 + GIT_TAG 38ff50766c7e4ec490fecb2d9939b7cdc4b74b8e + VERSION 0.14.3 EXCLUDE_FROM_ALL ON OPTIONS "BUILD_WITH_QT6 ON" "USE_CREDENTIAL_STORE ON" "BUILD_SHARED_LIBS OFF" "BUILD_TRANSLATIONS OFF" ) @@ -154,9 +155,8 @@ endif() CPMAddPackage( NAME QCoro6 GIT_REPOSITORY https://github.com/danvratil/qcoro - # Using a newer hash because there's a build issue with one override - GIT_TAG b1bde3bdb36e3efdd13e62bae2eed8224734f15f - VERSION 0.9.0 + GIT_TAG fa5bc4296a252ad71c85209b60675bb025024a1e + VERSION 0.10.0 EXCLUDE_FROM_ALL ON OPTIONS "QCORO_BUILD_EXAMPLES OFF" "BUILD_TESTING OFF" "QCORO_WITH_QTDBUS ${LITH_DEPENDENCY_ENABLE_DBUS}" FIND_PACKAGE_ARGUMENTS "COMPONENTS ${LITH_QCORO_DEPENDENCY_MODULES} REQUIRED" diff --git a/dist/android/build.sh b/dist/android/build.sh index a58f97d..936e875 100644 --- a/dist/android/build.sh +++ b/dist/android/build.sh @@ -9,9 +9,9 @@ if [ -z "${ANDROID_OPENSSL_PATH}" ]; then ANDROID_OPENSSL_PATH="${ANDROID_SDK_ROOT}/android_openssl/ssl_3" fi -export QT_HOST_PATH="${Qt6_DIR}/../gcc_64" -export CMAKE_PREFIX_PATH=${Qt6_DIR}/lib/cmake -cmake .. -DQT_DEBUG_FIND_PACKAGE=ON -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DANDROID_OPENSSL_PATH="${ANDROID_OPENSSL_PATH}" -DQT_ANDROID_BUILD_ALL_ABIS=ON +export QT_HOST_PATH="${QT_ROOT_DIR}/../gcc_64" +export CMAKE_PREFIX_PATH=${QT_ROOT_DIR}/lib/cmake +cmake .. -DQT_DEBUG_FIND_PACKAGE=ON -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DANDROID_OPENSSL_PATH="${ANDROID_OPENSSL_PATH}" -DQT_ANDROID_BUILD_ALL_ABIS=ON cmake --build . --target Lith -- -j2 cmake --build . --target apk -- -j2 diff --git a/dist/ios/build.sh b/dist/ios/build.sh index b0b6c01..6d08c89 100644 --- a/dist/ios/build.sh +++ b/dist/ios/build.sh @@ -5,8 +5,8 @@ set -x mkdir build_ios cd build_ios -export QT_HOST_PATH="${Qt6_DIR}/../macos" -cmake .. -GXcode -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DVERSION=$VERSION_NAME -DIOS_DEVELOPMENT_TEAM_ID=Z52EFCPL6D -DIMGUR_API_KEY=$IMGUR_API_KEY +export QT_HOST_PATH="${QT_ROOT_DIR}/../macos" +cmake .. -GXcode -DCMAKE_PREFIX_PATH=$QT_ROOT_DIR -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DVERSION=$VERSION_NAME -DIOS_DEVELOPMENT_TEAM_ID=Z52EFCPL6D -DIMGUR_API_KEY=$IMGUR_API_KEY xcodebuild -project Lith.xcodeproj -destination generic/platform=iOS -scheme Lith -configuration Release DEVELOPMENT_TEAM=Z52EFCPL6D build xcodebuild -project Lith.xcodeproj -scheme Lith -configuration Release archive -archivePath Lith.xcarchive DEVELOPMENT_TEAM=Z52EFCPL6D diff --git a/dist/macos/build.sh b/dist/macos/build.sh index ed42188..31ee22f 100755 --- a/dist/macos/build.sh +++ b/dist/macos/build.sh @@ -2,6 +2,6 @@ mkdir build_macos cd build_macos -export CMAKE_PREFIX_PATH=$Qt6_DIR/lib/cmake +export CMAKE_PREFIX_PATH=$QT_ROOT_DIR/lib/cmake cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DVERSION=$VERSION_NAME -DCMAKE_INSTALL_PREFIX=installed cmake --build . --parallel diff --git a/dist/wasm/build.sh b/dist/wasm/build.sh index d6991d1..340c35e 100644 --- a/dist/wasm/build.sh +++ b/dist/wasm/build.sh @@ -5,8 +5,8 @@ set -x mkdir build_wasm pushd build_wasm -export QT_HOST_PATH="${Qt6_DIR}/../gcc_64" -export CMAKE_PREFIX_PATH=$Qt6_DIR/lib/cmake -cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$Qt6_DIR/lib/cmake/Qt6/qt.toolchain.cmake +export QT_HOST_PATH="${QT_ROOT_DIR}/../gcc_64" +export CMAKE_PREFIX_PATH=$QT_ROOT_DIR/lib/cmake +cmake .. -DCMAKE_BUILD_TYPE=Release -DIMGUR_API_KEY=$IMGUR_API_KEY -DCMAKE_INSTALL_PREFIX=installed -DCMAKE_TOOLCHAIN_FILE=$QT_ROOT_DIR/lib/cmake/Qt6/qt.toolchain.cmake cmake --build . cmake --install .