# Copyright 2021-2023, Collabora, Ltd. # SPDX-License-Identifier: CC0-1.0 name: Android on: workflow_call: inputs: release: description: "Is this a release to publish?" type: boolean default: false snapshot: description: "Is this a snapshot to publish?" type: boolean default: false debug: type: boolean description: "Should we make a debug configured build?" default: true jobs: # Loader loader: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Get modern CMake and Ninja uses: "lukka/get-cmake@v3.30.3" # Do this before building aar since it affects the version - name: Touch SNAPSHOT marker file if: "!inputs.release" run: "touch SNAPSHOT" - name: "Build AAR" run: "./maintainer-scripts/build-aar.sh" - name: Upload bare AAR uses: "actions/upload-artifact@v4" with: name: AAR and POM path: openxr_loader_for_android* # Hello XR build-helloxr: runs-on: ubuntu-latest steps: - uses: "actions/checkout@v4" - name: "Get modern CMake and Ninja" uses: "lukka/get-cmake@v3.30.3" - name: "set up JDK 11" uses: "actions/setup-java@v4" with: java-version: "11" distribution: "temurin" # Also performs Gradle wrapper validation - uses: "gradle/actions/setup-gradle@v4" # HelloXR OpenGLES version - name: Build HelloXR OpenGLES for Android run: "cd src/tests/hello_xr && ./gradlew assembleOpenGLES${{ inputs.release && 'Release' || 'Debug' }}" - name: Upload HelloXR OpenGLES (debug) for Android if: "!inputs.release" uses: "actions/upload-artifact@v4" with: name: HelloXR OpenGLES Android path: "src/tests/hello_xr/build/outputs/apk/OpenGLES/debug/*.apk"