Skip to content

Commit

Permalink
Work on CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Oct 11, 2023
1 parent 81fbb05 commit d274899
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builds_desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/builds_desktop_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/builds_mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/builds_mobile_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}} \
Expand Down Expand Up @@ -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 \
Expand Down
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ 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"
)

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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions assets/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit d274899

Please sign in to comment.