forked from darkclad/uxspace
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (84 loc) · 2.88 KB
/
Copy pathandroid.yml
File metadata and controls
98 lines (84 loc) · 2.88 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
name: Android
on:
push:
branches: [main]
pull_request:
# Weekly, so SDK, NDK and toolchain drift surface without a commit.
schedule:
- cron: "0 7 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: assemble debug APK
runs-on: ubuntu-latest
defaults:
run:
working-directory: Android
steps:
- uses: actions/checkout@v4
with:
# The viture-v2 driver is a submodule and is built from source.
submodules: recursive
# Verifies the wrapper JAR against the published checksums before it runs.
- uses: gradle/actions/wrapper-validation@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- uses: android-actions/setup-android@v3
- name: Install the pinned NDK and CMake
run: sdkmanager --install "ndk;30.0.14904198" "cmake;4.1.2"
- name: Install the Rust Android target
run: rustup target add aarch64-linux-android
- uses: gradle/actions/setup-gradle@v4
# Builds libviture_v2.so from the submodule and then the APK around it.
# There is no proprietary SDK to fetch — that is the point of this fork.
- name: Assemble
run: ./gradlew :app:assembleDebug --stacktrace
- name: Verify the APK carries the open driver
run: |
set -euo pipefail
apk=app/build/outputs/apk/debug/app-debug.apk
unzip -l "$apk" | grep -q 'lib/arm64-v8a/libviture_v2.so'
unzip -l "$apk" | grep -q 'lib/arm64-v8a/libglasses_bridge.so'
if unzip -l "$apk" | grep -q 'libglasses\.so'; then
echo "proprietary libglasses.so present — this fork should not ship it"
exit 1
fi
echo "APK contains the open driver and no vendor SDK"
- uses: actions/upload-artifact@v4
with:
name: uxspace-debug-apk
path: Android/app/build/outputs/apk/debug/app-debug.apk
retention-days: 14
lint:
name: Android lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: Android
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: gradle/actions/wrapper-validation@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- uses: android-actions/setup-android@v3
- run: sdkmanager --install "ndk;30.0.14904198" "cmake;4.1.2"
- run: rustup target add aarch64-linux-android
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew :app:lintDebug
- uses: actions/upload-artifact@v4
if: always()
with:
name: lint-report
path: Android/app/build/reports/lint-results-debug.html
retention-days: 14