Skip to content

Commit

Permalink
android: upgrade build
Browse files Browse the repository at this point in the history
  • Loading branch information
janbar committed Sep 17, 2024
1 parent c97dc00 commit 555196f
Show file tree
Hide file tree
Showing 15 changed files with 319 additions and 488 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/build-android-ndk18.yml

This file was deleted.

87 changes: 0 additions & 87 deletions .github/workflows/build-android-ndk21.yml

This file was deleted.

94 changes: 94 additions & 0 deletions .github/workflows/build-android-x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: build android_x64

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
environment: build
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Java JDK for Android SDK tools
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Setup Android SDK tools
uses: android-actions/setup-android@v3
with:
packages: "platform-tools platforms;android-31 build-tools;31.0.0 ndk;21.4.7075529"
- name: Dump Android NDK
run: "ls ${ANDROID_HOME}/ndk"

- name: Configure ENV
run: |
echo "ANDROID_NDK=${ANDROID_HOME}/ndk/21.4.7075529" >> $GITHUB_ENV
echo "QT_DIR=${HOME}/Qt/5.15.14/android" >> $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

- 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
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
- name: Fetch submodules
run: git submodule init && git submodule update
- name: Configure build
run: |
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 \
-DCMAKE_BUILD_TYPE=Debug \
-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_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 \
-DQt5AndroidExtras_DIR=$QT_DIR/lib/cmake/Qt5AndroidExtras \
-Wno-dev
- name: Build
run: cmake --build build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: osmin-x86_64-debug
path: ${{ github.workspace }}/build/noson-gui-x86_64/build/outputs/apk/debug/noson-gui-*-debug.apk
retention-days: 5

1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ if(ANDROID)
VERSION_CODE ${APP_VERSION_CODE}
PACKAGE_NAME ${APP_ID}
PACKAGE_SOURCES ${CMAKE_SOURCE_DIR}/android/package-sources
BUILDTOOLS_REVISION ${QT_ANDROID_SDK_BUILDTOOLS_REVISION}
DEPENDS ssl crypto FLAC FLACXX
PLUGINS ${PLUGINS_BINARY_DIR}
KEYSTORE ${KEYSTORE_FILE} ${KEYSTORE_ALIAS}
Expand Down
Loading

0 comments on commit 555196f

Please sign in to comment.