2023-12-19 02:38:10 +01:00
|
|
|
---
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'build/**'
|
|
|
|
- 'doc/**'
|
|
|
|
- 'python/**'
|
|
|
|
- 'subprojects/**'
|
|
|
|
- 'systemd/**'
|
|
|
|
- 'win32/**'
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- v0.23.x
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'build/**'
|
|
|
|
- 'doc/**'
|
|
|
|
- 'python/**'
|
|
|
|
- 'subprojects/**'
|
|
|
|
- 'systemd/**'
|
|
|
|
- 'win32/**'
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- v0.23.x
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-android:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- id: checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- id: cache-ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1
|
|
|
|
with:
|
|
|
|
key: android
|
|
|
|
|
|
|
|
- name: Set up JDK 17
|
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
distribution: 'zulu'
|
|
|
|
java-version: 17
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y --no-install-recommends \
|
|
|
|
ninja-build \
|
|
|
|
quilt
|
2023-12-22 14:38:08 +01:00
|
|
|
pip3 install --user meson==1.3.0
|
2023-12-19 02:38:10 +01:00
|
|
|
|
|
|
|
- name: Install SDK
|
|
|
|
run: |
|
|
|
|
cd /opt
|
|
|
|
mkdir -p android-sdk/cmdline-tools/latest
|
|
|
|
wget https://dl.google.com/android/repository/commandlinetools-linux-10406996_latest.zip
|
|
|
|
unzip commandlinetools-linux-10406996_latest.zip -d commandlinetools
|
|
|
|
mv commandlinetools/cmdline-tools/* ./android-sdk/cmdline-tools/latest
|
|
|
|
yes | /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --update
|
|
|
|
yes | /opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --licenses
|
|
|
|
/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager --install "build-tools;29.0.3" "platforms;android-29" "ndk;26.1.10909125"
|
|
|
|
cd -
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
mkdir -p output/android
|
|
|
|
cd ./output/android
|
|
|
|
../../android/build.py /opt/android-sdk /opt/android-sdk/ndk/26.1.10909125 arm64-v8a \
|
|
|
|
--buildtype=debugoptimized -Db_ndebug=true \
|
|
|
|
-Dwrap_mode=forcefallback
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd ./android
|
|
|
|
./gradlew assembleDebug
|
|
|
|
|