From d274899eb710a4fb1fefa0c1abb63f4db2c1c9e8 Mon Sep 17 00:00:00 2001 From: Emeric Date: Wed, 11 Oct 2023 17:08:29 +0200 Subject: [PATCH] Work on CI builds --- .github/workflows/builds_desktop.yml | 2 +- .github/workflows/builds_desktop_cmake.yml | 5 ++--- .github/workflows/builds_mobile.yml | 2 +- .github/workflows/builds_mobile_cmake.yml | 5 +++-- CMakeLists.txt | 6 ++---- README.md | 2 +- assets/android/build.gradle | 4 ++-- 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/builds_desktop.yml b/.github/workflows/builds_desktop.yml index b128f21..aa18078 100644 --- a/.github/workflows/builds_desktop.yml +++ b/.github/workflows/builds_desktop.yml @@ -15,7 +15,7 @@ on: env: APP_NAME: "QmlAppTemplate" APP_VERSION: "0.6" - QT_VERSION: "6.5.3" + QT_VERSION: "6.6.0" #------------------------------------------------------------------------------- # Workflow jobs diff --git a/.github/workflows/builds_desktop_cmake.yml b/.github/workflows/builds_desktop_cmake.yml index 29169b7..3734f17 100644 --- a/.github/workflows/builds_desktop_cmake.yml +++ b/.github/workflows/builds_desktop_cmake.yml @@ -15,7 +15,7 @@ on: env: APP_NAME: "QmlAppTemplate" APP_VERSION: "0.6" - QT_VERSION: "6.5.3" + QT_VERSION: "6.6.0" #------------------------------------------------------------------------------- # Workflow jobs @@ -104,12 +104,11 @@ jobs: - name: Setup env run: | cmake --version - alias nproc="sysctl -n hw.logicalcpu" - export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) # Build application - name: Build application run: | + export CMAKE_BUILD_PARALLEL_LEVEL=`sysctl -n hw.logicalcpu` cd build/ cmake .. cmake --build . diff --git a/.github/workflows/builds_mobile.yml b/.github/workflows/builds_mobile.yml index a0220a9..f6ba5c3 100644 --- a/.github/workflows/builds_mobile.yml +++ b/.github/workflows/builds_mobile.yml @@ -15,7 +15,7 @@ on: env: APP_NAME: "QmlAppTemplate" APP_VERSION: "0.6" - QT_VERSION: "6.5.3" + QT_VERSION: "6.6.0" #------------------------------------------------------------------------------- # Workflow jobs diff --git a/.github/workflows/builds_mobile_cmake.yml b/.github/workflows/builds_mobile_cmake.yml index 840e20c..37d524d 100644 --- a/.github/workflows/builds_mobile_cmake.yml +++ b/.github/workflows/builds_mobile_cmake.yml @@ -15,7 +15,7 @@ on: env: APP_NAME: "QmlAppTemplate" APP_VERSION: "0.6" - QT_VERSION: "6.5.3" + QT_VERSION: "6.6.0" #------------------------------------------------------------------------------- # Workflow jobs @@ -77,7 +77,7 @@ jobs: # Build application - name: Build application run: | - export JAVA_HOME=$JAVA_HOME_11_X64 + export JAVA_HOME=$JAVA_HOME_17_X64 qt-cmake -B build/ \ -DCMAKE_SYSTEM_NAME=Android \ -DCMAKE_FIND_ROOT_PATH:PATH=${{env.QT_TARGET_PATH}} \ @@ -128,6 +128,7 @@ jobs: # Build application - name: Build application run: | + echo "QT_HOST_PATH=${{env.QT_HOST_PATH}}" qt-cmake -B build/ -G Xcode \ -DQT_HOST_PATH=${{env.QT_HOST_PATH}} \ -DCMAKE_SYSTEM_NAME=iOS \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 83e0a43..45086c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,8 +40,8 @@ target_include_directories(QmlAppTemplate PUBLIC src/thirdparty) ## Android if(ANDROID) - #set(QT_ANDROID_ABIS "armeabi-v7a;arm64-v8a;x86;x86_64") - #set(QT_ANDROID_BUILD_ALL_ABIS "ON") + set(QT_ANDROID_ABIS "armeabi-v7a;arm64-v8a;x86;x86_64") + set(QT_ANDROID_BUILD_ALL_ABIS "ON") set_target_properties(QmlAppTemplate PROPERTIES QT_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/assets/android" @@ -49,8 +49,6 @@ if(ANDROID) target_link_libraries(QmlAppTemplate PRIVATE Qt::CorePrivate) - #-DQT_ANDROID_ABIS="armeabi-v7a;arm64-v8a;x86;x86_64" - #-DQT_ANDROID_BUILD_ALL_ABIS=ON #-DQT_ANDROID_MIN_SDK_VERSION=23 #add_qt_android_apk(my_app_apk my_app # PACKAGE_NAME "io.emeric.qmlapptemplate" diff --git a/README.md b/README.md index 0532812..451cb20 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A Qt6 / QML application template, with a full set of visual controls, helper mod You will need a C++17 compiler and Qt 6.5+. Qt 5 Compatibility Module is required. For macOS and iOS builds, you'll need Xcode (13+) installed. -For Android builds, you'll need the appropriates JDK (11) SDK (24+) and NDK (25+). You can customize Android build environment using the `assets/android/gradle.properties` file. +For Android builds, you'll need the appropriates JDK (17) SDK (24+) and NDK (25+). You can customize Android build environment using the `assets/android/gradle.properties` file. #### Building QmlAppTemplate diff --git a/assets/android/build.gradle b/assets/android/build.gradle index f73aa0e..14890b5 100644 --- a/assets/android/build.gradle +++ b/assets/android/build.gradle @@ -5,8 +5,8 @@ buildscript { } dependencies { - //classpath 'com.android.tools.build:gradle:8.1.2' // works with Qt 6.5+ - classpath 'com.android.tools.build:gradle:7.4.2' // works with Qt 6.5 + classpath 'com.android.tools.build:gradle:8.1.2' // works with Qt 6.5+ + //classpath 'com.android.tools.build:gradle:7.4.2' // works with Qt 6.5 //classpath 'com.android.tools.build:gradle:7.2.1' // works with Qt 6.4 } }