1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-25 04:05:53 +01:00
GPXSee/.github/workflows/android.yml

54 lines
1.7 KiB
YAML
Raw Normal View History

2022-06-04 10:39:29 +02:00
name: Android
on:
push:
branches:
- master
jobs:
build:
name: GPXSee
runs-on: ubuntu-20.04
steps:
- name: Checkout
2022-07-31 14:00:51 +02:00
uses: actions/checkout@v3
2022-06-10 23:40:47 +02:00
- name: set up JDK 11
2022-07-31 14:00:51 +02:00
uses: actions/setup-java@v3
2022-06-04 10:39:29 +02:00
with:
2022-07-31 14:05:46 +02:00
distribution: 'zulu'
2022-06-10 23:40:47 +02:00
java-version: '11'
2022-06-04 10:39:29 +02:00
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Run sdkmanager update
run: ${ANDROID_HOME}/tools/bin/sdkmanager --update
- name: Install android platform, platform-tools, build-tools and ndk
2022-10-08 15:38:36 +02:00
run: ${ANDROID_HOME}/tools/bin/sdkmanager --install "cmdline-tools;latest" "platform-tools" "platforms;android-31" "build-tools;31.0.0" "ndk;23.1.7779620"
2022-07-31 17:10:32 +02:00
- name: Setup NDK path
2022-10-08 15:38:36 +02:00
run: echo "ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/23.1.7779620/" >> $GITHUB_ENV
- name: Install Qt (Desktop)
2022-11-19 13:20:06 +01:00
uses: jurplel/install-qt-action@v3
with:
2022-07-31 14:22:51 +02:00
aqtversion: '==2.1.0'
2022-11-23 20:54:55 +01:00
version: '6.4.0'
- name: Install Qt (Android)
2022-11-19 13:20:06 +01:00
uses: jurplel/install-qt-action@v3
2022-06-04 10:39:29 +02:00
with:
2022-07-31 14:22:51 +02:00
aqtversion: '==2.1.0'
2022-11-23 20:54:55 +01:00
version: '6.4.0'
2022-06-04 10:39:29 +02:00
target: 'android'
2022-06-04 12:38:17 +02:00
arch: 'android_armv7'
2023-02-01 22:57:41 +01:00
modules: qtpositioning qt5compat qtserialport
2022-06-10 23:26:28 +02:00
- name: Install Android OpenSSL
run: git clone https://github.com/KDAB/android_openssl.git
- name: Create localization
run: lrelease gpxsee.pro
2022-06-04 10:39:29 +02:00
- name: Configure build
2022-07-31 17:10:32 +02:00
run: qmake gpxsee.pro OPENSSL_PATH=android_openssl
2022-06-04 10:39:29 +02:00
- name: Build project
2022-06-10 23:26:28 +02:00
run: make -j2 apk
2022-06-11 00:02:23 +02:00
- name: Upload artifacts
2022-11-19 13:20:06 +01:00
uses: actions/upload-artifact@v3
2022-06-11 00:02:23 +02:00
with:
name: GPXSee-armv7.apk
path: android-build/build/outputs/apk/debug/android-build-debug.apk