-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.58 KB
/
android-kotlin.yml
File metadata and controls
52 lines (42 loc) · 1.58 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Android Kotlin
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * 1"
permissions:
contents: read
jobs:
build-android-kotlin-app:
name: Build Android Kotlin app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- uses: android-actions/setup-android@v3
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Install Android SDK packages
run: sdkmanager "platforms;android-36" "build-tools;36.0.0"
- name: Build Ladybug Java jar
env:
SKIP_CMAKE_BUILD: "true"
run: |
./gradlew jar
echo "LBUG_JAR=$(ls "$GITHUB_WORKSPACE"/build/libs/lbug-*.jar | head -n 1)" >> "$GITHUB_ENV"
- name: Build Android Kotlin example
run: ./gradlew -p examples/android-kotlin :app:assembleDebug -PlbugJar="$LBUG_JAR"
- name: Test Android Kotlin example on emulator
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: 35
target: google_apis
arch: x86_64
profile: pixel_6
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
script: ./gradlew -p examples/android-kotlin :app:connectedDebugAndroidTest -PlbugJar="$LBUG_JAR"