Skip to content

Commit 4bd7fb1

Browse files
authored
Add GitHub Actions workflow for building Android SDK AAR
1 parent 3fbecd0 commit 4bd7fb1

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build Android SDK AAR (Debug)
2+
on:
3+
workflow_dispatch: # Manual trigger
4+
5+
env:
6+
JAVA_HOME: /usr/lib/jvm/temurin-21-jdk-amd64 # Java 21 is required for Android Gradle 8 plugin
7+
SKIP_MAP_DOWNLOAD: false
8+
#SKIP_GENERATE_SYMBOLS: false
9+
#SKIP_GENERATE_DRULES: false
10+
11+
12+
jobs:
13+
build-aar:
14+
name: Build Android SDK AAR (Debug)
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Install build tools and dependencies
19+
shell: bash
20+
run: |
21+
sudo apt-get update -y
22+
sudo apt-get install -y ninja-build \
23+
qt6-base-dev \
24+
qt6-declarative-dev \
25+
qt6-positioning-dev \
26+
libqt6svg6-dev \
27+
optipng \
28+
libfreetype-dev \
29+
libharfbuzz-dev \
30+
libxrandr-dev \
31+
libxinerama-dev \
32+
libxcursor-dev \
33+
libxi-dev \
34+
python3-pip \
35+
zlib1g-dev
36+
pip install "protobuf<3.21" --break-system-packages
37+
38+
- name: Checkout sources
39+
uses: actions/checkout@v4
40+
with:
41+
fetch-depth: 200 # enough to get all commits for the current day
42+
43+
- name: Parallel submodules checkout
44+
shell: bash
45+
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
46+
47+
- name: Configure ccache
48+
uses: hendrikmuhs/ccache-action@v1.2
49+
with:
50+
key: ${{ github.workflow }}-sdk-aar
51+
52+
- name: Configure repository
53+
shell: bash
54+
run: ./configure.sh
55+
56+
- name: Compile SDK AAR (Debug)
57+
shell: bash
58+
working-directory: android
59+
env:
60+
CMAKE_C_COMPILER_LAUNCHER: ccache
61+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
62+
run: |
63+
cmake --version
64+
ninja --version
65+
./gradlew :sdk:assembleDebug
66+
67+
- name: Upload SDK AAR (Debug)
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: android-sdk-debug.aar
71+
path: android/sdk/build/outputs/aar/sdk-debug.aar
72+
if-no-files-found: error
73+
74+
#- name: Upload Entire SDK Build Directory
75+
# uses: actions/upload-artifact@v4
76+
# with:
77+
# name: sdk-build-directory
78+
# path: android/sdk/build/
79+
# if-no-files-found: error

0 commit comments

Comments
 (0)