-
Notifications
You must be signed in to change notification settings - Fork 70
79 lines (69 loc) · 2.78 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build for Android
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Setup Android SDK
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # v2
- uses: nttld/setup-ndk@8c3b609ff4d54576ea420551943fd34b4d03b0dc # v1
id: setup-ndk
with:
# Newer doesn't work with Qt 5.15: https://bugreports.qt.io/browse/QTBUG-104580
ndk-version: r21
add-to-path: false
- name: Install Qt
uses: jurplel/install-qt-action@43ec12788e42f375acfcb2cec059edfb9572fbaa # v3
with:
version: '5.15.2'
host: 'linux'
target: 'android'
arch: 'android'
cache: true
- name: Build firebird
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
mkdir build
cd build
qmake .. ANDROID_ABIS="arm64-v8a armeabi-v7a"
make -j4 apk_install_target
# "platforms;android-33" currently points to an "android-33-ext4" platform, but the "-ext4"
# suffix breaks androiddeployqt which uses the last component as "androidCompileSdkVersion".
# By using android-32 as platform this is worked around. It'll be installed automatically.
- name: Pack APK
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
ANDROID_KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
ANDROID_KEYSTORE_PWD: ${{ secrets.ANDROID_KEYSTORE_PWD }}
run: |
cd build
if [ -n "$ANDROID_KEYSTORE_PWD" ]; then
echo "$ANDROID_KEYSTORE" | base64 -d > keystore.jks
androiddeployqt --android-platform android-32 --input android-firebird-emu-deployment-settings.json --output android-build --apk firebird-emu.apk --sign keystore.jks firebirdemugh --storepass "$ANDROID_KEYSTORE_PWD"
else
androiddeployqt --android-platform android-32 --input android-firebird-emu-deployment-settings.json --output android-build --apk firebird-emu.apk
fi
- name: Upload zip
uses: actions/upload-artifact@v3
with:
name: firebird-emu-android
path: build/firebird-emu.apk
if-no-files-found: error