-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (81 loc) · 2.76 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
80
81
82
83
84
85
name: Compile on Android
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt for Desktop
uses: jurplel/install-qt-action@v3
with:
cache: 'true'
cache-key-prefix: 'install-qt-action-host'
version: '6.6.*'
- name: Set QT_HOST_PATH
run: |
echo QT_HOST_PATH=$Qt6_DIR >> $GITHUB_ENV
- name: Install Qt for Android arm64
uses: jurplel/install-qt-action@v3
with:
cache: 'true'
cache-key-prefix: 'install-qt-action-android'
modules: 'qtlocation qtpositioning'
target: 'android'
version: '6.6.*'
arch: 'android_arm64_v8a'
- name: Install Additional Software
run: |
sudo apt install ninja-build
echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "platforms;android-33" "platform-tools" "build-tools;33.0.2"
echo ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/25.1.8937393 >> $GITHUB_ENV
- name: Remove Unwanted Software
run: |
echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --uninstall "platforms;android-33-ext4" "platforms;android-33-ext5" "platforms;android-34-ext8"
echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "ndk;25.1.8937393"
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: android
- name: Compile and Install libzip
run: |
$Qt6_DIR/bin/qt-cmake \
-G Ninja \
-S libzip \
-B build-libzip \
-DBUILD_DOC=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_REGRESS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TOOLS=OFF \
-DENABLE_BZIP2=OFF \
-DENABLE_LZMA=OFF \
-DENABLE_ZSTD=OFF \
-DCMAKE_INSTALL_PREFIX=Qt/android_arm64_v8a
cmake --build build-libzip
cmake --install build-libzip
- name: Compile and Install maplibre-native-qt
run: |
$Qt6_DIR/bin/qt-cmake \
-S maplibre-native-qt \
-B build-maplibre-native-qt \
-G Ninja \
-DBUILD_TESTING=OFF \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_PREFIX_PATH=$Qt6_DIR \
-DCMAKE_INSTALL_PREFIX=Qt/android_arm64_v8a
cmake --build build-maplibre-native-qt
cmake --install build-maplibre-native-qt
- name: Package
run: |
tar cvfz enrouteDependencies_android_arm64.tar.gz Qt
- name: Upload to developerBuilds
run: |
gh release upload --clobber developerBuilds *.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}