-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (41 loc) · 1.67 KB
/
build.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
name: Android CI
on:
push:
branches-ignore:
- 'l10n_master'
jobs:
build:
name: Test & Build
runs-on: ubuntu-latest
steps:
- name: Enable KVM group perms
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
ls /dev/kvm
- name: Check Out Repository
uses: actions/checkout@v4
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Run Unit Tests
run: bash ./gradlew testFdroidDebugUnitTest
- name: Accept Licenses
run: yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses || true
- name: Run UI Tests
run: bash ./gradlew allDevicesFdroidDebugAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true -Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1 -Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=180
- name: Assemble App Debug APK
run: ./gradlew assembleDebug
- name: Upload App Play APK
uses: actions/upload-artifact@v4
with:
name: app-play-debug
path: app/build/outputs/apk/play/debug/app-play-debug.apk
- name: Upload App F-Droid APK
uses: actions/upload-artifact@v4
with:
name: app-fdroid-debug
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk