-
Notifications
You must be signed in to change notification settings - Fork 299
34 lines (33 loc) · 1.04 KB
/
android.yml
File metadata and controls
34 lines (33 loc) · 1.04 KB
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
name: Android build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- armeabi-v7a
- arm64-v8a
- x86
- x86_64
api:
- 16
- 18
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build script
env:
TARGET: ${{ matrix.target }}
API: ${{ matrix.api }}
run: |
NDK="$($ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list_installed | sed -E 's/( +[|] +)/|/g;s/ +$//' | grep '^ ndk' | cut -d '|' -f 4 | sort | head -n1)"
cmake -B _build \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/$NDK/build/cmake/android.toolchain.cmake \
-DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON \
-DANDROID_ABI=$ABI -DANDROID_PLATFORM=android-$API \
-DCMAKE_BUILD_TYPE=Release
cmake --build _build --verbose