-
Notifications
You must be signed in to change notification settings - Fork 17
97 lines (87 loc) · 3.59 KB
/
build_android_x64.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: build android_x64
on:
pull_request:
branches:
- debug
- master
- dev/1.13
push:
branches:
- debug
- master
- dev/1.13
jobs:
build:
runs-on: ubuntu-24.04
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;26.1.10909125"
- 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.15/android" >> $GITHUB_ENV
- name: Cache Qt
id: cache-qt
uses: actions/cache@v3
env:
cache-name: cache-qt
with:
path: ~/Qt/5.15.15/android
key: qtandroid-51515-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.15-android-ndk21-linux64.tar.xz
mkdir -p ~/Qt
tar xfJ qt-5.15.15-android-ndk21-linux64.tar.xz -C ~/Qt/
rm -f qt-5.15.15-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=${Qt5_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_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 \
-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/osmin-x86_64/build/outputs/apk/debug/osmin-*-debug.apk
retention-days: 5