-
Notifications
You must be signed in to change notification settings - Fork 257
36 lines (34 loc) · 1.08 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
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: |
mkdir _build
NDK="$($ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list_installed | sed -E 's/( +[|] +)/|/g;s/ +$//' | grep '^ ndk' | cut -d '|' -f 4 | sort | head -n1)"
cd _build && \
cmake .. -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/$NDK/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=$ABI \
-DANDROID_PLATFORM=android-$API \
-DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . --verbose