mpd/.github/workflows/build_android.yml
Max Kellermann 4ba288501d .github/workflows/build.yml: install ccache manually
This eliminates the additionoal "apt-get install" call by
ccache-action.
2024-05-06 12:46:44 +02:00

65 lines
1.5 KiB
YAML

---
on:
workflow_dispatch:
push:
paths-ignore:
- 'build/**'
- 'doc/**'
- 'subprojects/**'
- 'systemd/**'
- 'win32/**'
branches:
- master
pull_request:
paths-ignore:
- 'build/**'
- 'doc/**'
- 'subprojects/**'
- 'systemd/**'
- 'win32/**'
branches:
- master
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build-android:
runs-on: ubuntu-22.04
steps:
- id: checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ninja-build \
ccache \
quilt
pip3 install --user meson==1.3.0
- id: cache-ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: android
# todo: remove once NDK 27 is out of beta
- name: Install Beta NDK
run: |
echo y | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "ndk;27.0.11718014"
- name: Build
run: |
mkdir -p output/android
cd ./output/android
../../android/build.py $ANDROID_SDK_ROOT $ANDROID_SDK_ROOT/ndk/27.0.11718014 arm64-v8a \
--buildtype=debugoptimized -Db_ndebug=true \
-Dwrap_mode=forcefallback
cd -
cd ./android
export JAVA_HOME=$JAVA_HOME_17_X64
./gradlew assembleDebug