Repository navigation
146 lines (123 loc) · 5.19 KB
/
Copy pathpr.yml
File metadata and controls
146 lines (123 loc) · 5.19 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: PR checks
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
# A new push to the same PR cancels the previous run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
name: clang-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# Exact pin: output differs even between 18.x point releases (Ubuntu's
# 18.1.3 and PyPI's 18.1.8 disagree), and the tree is kept clean against
# this one. Developers can match it with: pip install clang-format==18.1.8
- name: Install clang-format 18.1.8
run: |
pipx install clang-format==18.1.8
clang-format --version
- name: Run scripts/format_sources.sh
run: scripts/format_sources.sh
- name: Fail if formatting changed anything
run: |
if ! git diff --exit-code; then
echo "::error::Sources are not clang-formatted. Run scripts/format_sources.sh and commit the result."
exit 1
fi
native-test:
name: Host GoogleTest (videonative)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Configure
run: cmake -S app/videonative/src/main/cpp/tests -B build/gtest -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build/gtest --parallel
- name: Test
run: ctest --test-dir build/gtest --output-on-failure
build:
name: Debug APK
runs-on: ubuntu-latest
outputs:
artifact: ${{ steps.artifact_name.outputs.name }}
steps:
# Non-recursive on purpose: the build only needs devourer and wfb-ng
# themselves. devourer's own reference/ submodules are vendor driver
# trees that are not compiled here and are not always fetchable.
# This also checks that the pinned devourer / wfb-ng commits exist upstream.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
- name: Build
run: ./gradlew assembleDebug
- name: Artifact name
id: artifact_name
run: echo "name=PixelPilot-debug-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Upload debug APK
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: ${{ steps.artifact_name.outputs.name }}
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 14
if-no-files-found: error
# Hardware-free end-to-end check of the videonative path: the debug APK runs
# on an x86_64 API-34 emulator under NDK ARM translation (PixelPilot ships
# arm64/armv7 only), accepts the VPN consent, reaches the no-adapter screen,
# and decodes a synthetic H.264 RTP stream pushed to UDP 5600. Driven by
# flows/pixelpilot_smoke.py from OpenIPC/android-emulator-qa.
# Non-blocking for now: emulator runs are slower and flakier than the rest.
emulator-smoke:
name: Emulator smoke (non-blocking)
runs-on: ubuntu-latest
needs: build
continue-on-error: true
timeout-minutes: 30
steps:
- name: Check out the QA harness
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: OpenIPC/android-emulator-qa
ref: 3be94489105f6ff8903a1dcdae90fa437cbbb23c # main, flows/pixelpilot_smoke.py added
path: qa
- name: Download debug APK
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: ${{ needs.build.outputs.artifact }}
path: apk
- 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 ffmpeg
run: |
sudo apt-get update -q
sudo apt-get install -y -q ffmpeg
- name: Run smoke flow on an API 34 x86_64 emulator
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0
with:
api-level: 34
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot-save -camera-back none
disable-animations: true
script: python3 qa/flows/pixelpilot_smoke.py --apk apk/app-debug.apk --run-dir qa-run --stream 15
- name: Upload run artifacts (screenshots, dumps, logcat, verdict)
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: emulator-smoke-${{ needs.build.outputs.artifact }}
path: qa-run
retention-days: 14
if-no-files-found: warn