From bbd6e813face14c427e17f8539c21e6f7e1768ca Mon Sep 17 00:00:00 2001 From: Demian Vladi Date: Fri, 2 Oct 2026 17:01:26 -0700 Subject: [PATCH 1/2] ci: run Android unit tests on push and PR JVM unit tests only; the VITURE SDK is not in the repo, so no native build or APK. --- .github/workflows/android.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/android.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..1e75912 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,51 @@ +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 + + # 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/ From 73551cc943d03213b015fe32d90b6a0136cba88b Mon Sep 17 00:00:00 2001 From: Demian Vladi Date: Fri, 2 Oct 2026 17:03:42 -0700 Subject: [PATCH 2/2] ci: install the NDK and CMake that :glasses pins --- .github/workflows/android.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 1e75912..2967959 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -38,6 +38,14 @@ jobs: # 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