Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Android

on:
push:
branches: [main]
paths:
- "Android/**"
- ".github/workflows/android.yml"
pull_request:
paths:
- "Android/**"
- ".github/workflows/android.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true

jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
working-directory: Android
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"

# Caches Gradle and validates the wrapper JAR checksum.
- uses: gradle/actions/setup-gradle@v4

# :glasses pins an NDK and CMake that the runner image doesn't ship; AGP resolves
# them at configuration time even when no native task runs.
- name: Install NDK and CMake
run: |
SDKMANAGER="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
yes | "$SDKMANAGER" --licenses > /dev/null
"$SDKMANAGER" --install "ndk;30.0.14904198" "cmake;4.1.2" > /dev/null

# The VITURE SDK (glasses/src/main/jniLibs, cpp/include) is not in the repo, so CI
# runs JVM unit tests only — no native build, no APK.
- name: Run unit tests
run: sh ./gradlew testDebugUnitTest --console=plain

- name: Upload test reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: unit-test-reports
path: Android/**/build/reports/tests/
Loading