Skip to content

Commit

Permalink
Update build_android_x64.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
janbar committed Sep 15, 2024
1 parent c3faa9b commit ef7f4b7
Showing 1 changed file with 45 additions and 29 deletions.
74 changes: 45 additions & 29 deletions .github/workflows/build_android_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
- debug
- master
- dev/1.13
- qt6

push:
branches:
- debug
- master
- dev/1.13
- qt6

jobs:
build:
Expand All @@ -25,65 +27,79 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Setup Android SDK tools
uses: android-actions/setup-android@v3
with:
packages: "platform-tools platforms;android-31 build-tools;31.0.0 ndk;26.1.10909125"
packages: "platform-tools platforms;android-34 build-tools;31.0.0 ndk;26.3.11579264"
- name: Dump Android NDK
run: "ls ${ANDROID_HOME}/ndk"

- name: Configure ENV
run: |
echo "ANDROID_NDK=${ANDROID_HOME}/ndk/26.1.10909125" >> $GITHUB_ENV
echo "QT_DIR=${HOME}/Qt/5.15.14/android" >> $GITHUB_ENV
echo "ANDROID_NDK=${ANDROID_HOME}/ndk/26.3.11579264" >> $GITHUB_ENV
echo "QT_DIR=${HOME}/Qt/6.7.2/android_x86_64" >> $GITHUB_ENV
echo "QT_HOST_PATH=${HOME}/Qt/6.7.2/android_x86_64/host" >> $GITHUB_ENV
- name: Cache Qt
id: cache-qt
uses: actions/cache@v3
env:
cache-name: cache-qt
with:
path: ~/Qt/5.15.14/android
key: qtandroid-51514-ndk21
path: |
~/Qt/6.7.2
~/Qt/android_openssl
key: qtandroid-60702-ndk26

- if: ${{ steps.cache-qt.outputs.cache-hit != 'true' }}
name: Install Qt
continue-on-error: true
run: |
wget -q ${{secrets.PRIVATE_URL_DOWNLOAD}}/qt/qt-5.15.14-android-ndk21-linux64.tar.xz
wget -q ${{secrets.PRIVATE_URL_DOWNLOAD}}/qt/qt-6.7.2-android-ndk26-linux64.tar.xz
wget -q ${{secrets.PRIVATE_URL_DOWNLOAD}}/qt/android_openssl-20240915.tar.xz
mkdir -p ~/Qt
tar xfJ qt-5.15.14-android-ndk21-linux64.tar.xz -C ~/Qt/
rm -f qt-5.15.14-android-ndk21-linux64.tar.xz
tar xfJ qt-6.7.2-android-ndk26-linux64.tar.xz -C ~/Qt/
tar xfJ android_openssl-20240915.tar.xz -C ~/Qt/
rm -f *.tar.xz
- name: Configure Android OpenSSL
run: ln -s ~/Qt/android_openssl ${ANDROID_SDK_ROOT}/android_openssl

- name: Fetch submodules
run: git submodule init && git submodule update
- name: Configure build
run: |
cmake -B build -DCMAKE_SYSTEM_NAME=Android -DCMAKE_PREFIX_PATH=${Qt5_DIR} \
cmake -B build -DCMAKE_SYSTEM_NAME=Android -DCMAKE_PREFIX_PATH=${QT_DIR} \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DCMAKE_MAKE_PROGRAM=${ANDROID_NDK}/prebuilt/linux-x86_64/bin/make \
-DANDROID_ABI=x86_64 -DANDROID_SDK_MINVER=24 -DANDROID_SDK_TARGET=26 \
-DANDROID_NATIVE_API_LEVEL=24 -DANDROID_SDK_BUILD_TOOLS_REVISION=31.0.0 \
-DANDROID_ABI=x86_64 -DANDROID_SDK_MINVER=26 -DANDROID_SDK_TARGET=26 \
-DANDROID_NATIVE_API_LEVEL=24 \
-DANDROID_SDK_BUILD_TOOLS_REVISION=31.0.0 \
-DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT} \
-DANDROID_NDK=${ANDROID_NDK} \
-DQT_ANDROID_PLATFORM_LEVEL=31 \
-DQt5_DIR=${QT_DIR}/lib/cmake/Qt5 \
-DQt5Core_DIR=${QT_DIR}/lib/cmake/Qt5Core \
-DQt5Gui_DIR=${QT_DIR}/lib/cmake/Qt5Gui \
-DQt5Qml_DIR=${QT_DIR}/lib/cmake/Qt5Qml \
-DQt5Network_DIR=${QT_DIR}/lib/cmake/Qt5Network \
-DQt5Quick_DIR=${QT_DIR}/lib/cmake/Qt5Quick \
-DQt5QuickControls2_DIR=${QT_DIR}/lib/cmake/Qt5QuickControls2 \
-DQt5Xml_DIR=${QT_DIR}/lib/cmake/Qt5Xml \
-DQt5Svg_DIR=${QT_DIR}/lib/cmake/Qt5Svg \
-DQt5Widgets_DIR=${QT_DIR}/lib/cmake/Qt5Widgets \
-DQt5QmlModels_DIR=${QT_DIR}/lib/cmake/Qt5QmlModels \
-DQt5Sensors_DIR=${QT_DIR}/lib/cmake/Qt5Sensors \
-DQt5Positioning_DIR=${QT_DIR}/lib/cmake/Qt5Positioning \
-DQt5Multimedia_DIR=${QT_DIR}/lib/cmake/Qt5Multimedia \
-DQt5AndroidExtras_DIR=${QT_DIR}/lib/cmake/Qt5AndroidExtras \
-DQt5RemoteObjects_DIR=${QT_DIR}/lib/cmake/Qt5RemoteObjects \
-DQT_ANDROID_PLATFORM_LEVEL=34 \
-DQt6_DIR=${QT_DIR}/lib/cmake/Qt6 \
-DQt6Core_DIR=${QT_DIR}/lib/cmake/Qt6Core \
-DQt6ZlibPrivate_DIR=${QT_DIR}/lib/cmake/Qt6ZlibPrivate \
-DQt6Gui_DIR=${QT_DIR}/lib/cmake/Qt6Gui \
-DQt6Qml_DIR=${QT_DIR}/lib/cmake/Qt6Qml \
-DQt6QmlIntegration_DIR=${QT_DIR}/lib/cmake/Qt6QmlIntegration \
-DQt6QmlBuiltins_DIR=${QT_DIR}/lib/cmake/Qt6QmlBuiltins \
-DQt6Network_DIR=${QT_DIR}/lib/cmake/Qt6Network \
-DQt6OpenGL_DIR=${QT_DIR}/lib/cmake/Qt6OpenGL \
-DQt6Core5Compat_DIR=${QT_DIR}/lib/cmake/Qt6Core5Compat \
-DQt6QuickTemplates2_DIR=${QT_DIR}/lib/cmake/Qt6QuickTemplates2 \
-DQt6Quick_DIR=${QT_DIR}/lib/cmake/Qt6Quick \
-DQt6QuickControls2_DIR=${QT_DIR}/lib/cmake/Qt6QuickControls2 \
-DQt6Xml_DIR=${QT_DIR}/lib/cmake/Qt6Xml \
-DQt6Svg_DIR=${QT_DIR}/lib/cmake/Qt6Svg \
-DQt6Widgets_DIR=${QT_DIR}/lib/cmake/Qt6Widgets \
-DQt6Sensors_DIR=${QT_DIR}/lib/cmake/Qt6Sensors \
-DQt6Positioning_DIR=${QT_DIR}/lib/cmake/Qt6Positioning \
-DQt6Multimedia_DIR=${QT_DIR}/lib/cmake/Qt6Multimedia \
-DQt6QmlModels_DIR=${QT_DIR}/lib/cmake/Qt6QmlModels \
-DQt6RemoteObjects_DIR=${QT_DIR}/lib/cmake/Qt6RemoteObjects \
-Wno-dev
- name: Build
run: cmake --build build
Expand Down

0 comments on commit ef7f4b7

Please sign in to comment.