-
Notifications
You must be signed in to change notification settings - Fork 37
61 lines (52 loc) · 1.49 KB
/
build_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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build and Test Android
on:
push:
branches:
- master
- dev
- 'release/*'
pull_request:
branches:
- '**'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, MinSizeRel, etc.)
BUILD_TYPE: Debug
jobs:
build:
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Android SDK
run: |
$ANDROID_SDK_ROOT/tools/bin/sdkmanager --install "ndk;23.1.7779620"
$ANDROID_SDK_ROOT/tools/bin/sdkmanager --install "cmake;3.22.1"
- name: Setup Java SDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 11
- name: Build
working-directory: ${{github.workspace}}
run: |
scripts/build_android.sh -a x86_64
- name: Prepare for Tests
working-directory: ${{github.workspace}}
run: |
cp -r build_android_out test/platforms/Android/app/libs/libcblite
- name: Tests
uses: reactivecircus/android-emulator-runner@v2
with:
# Encounter random emulator issue when using lower API (e.g. 21)
api-level: 23
arch: x86_64
working-directory: ./test/platforms/Android
script: |
adb logcat -s "CBLTests" &
./gradlew cAT -PabiFilters=x86_64
- name: Post Tests
working-directory: ${{github.workspace}}
run: |
ps ax | grep logcat | grep -v grep | awk '{print $1}' | xargs kill