-
Notifications
You must be signed in to change notification settings - Fork 166
71 lines (67 loc) · 2.3 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
name: Build
on:
push:
branches:
- main
pull_request:
jobs:
ANDROID_BASE_CHECKS:
name: Base Checks
runs-on: ubuntu-latest
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Perform base checks
run: ./gradlew demo:assembleDebug lib:deployLocal
ANDROID_EMULATOR_TESTS:
name: Emulator Tests
runs-on: ubuntu-latest
# Temporary workaround for deployer issue
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
strategy:
fail-fast: false
matrix:
EMULATOR_API: [23, 25, 29, 31, 34]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: gradle
- 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
- name: Execute emulator tests
timeout-minutes: 30
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.EMULATOR_API }}
arch: x86_64
profile: Nexus 6
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back none -camera-front none -gpu swiftshader_indirect
script: ./.github/workflows/emulator_script.sh logcat_${{ matrix.EMULATOR_API }}.txt
- name: Upload emulator logs
uses: actions/upload-artifact@v4
if: always()
with:
name: emulator_logs_${{ matrix.EMULATOR_API }}
path: ./logcat_${{ matrix.EMULATOR_API }}.txt
- name: Upload emulator tests artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: emulator_tests_${{ matrix.EMULATOR_API }}
path: ./lib/build/reports/androidTests/connected/debug/