-
Notifications
You must be signed in to change notification settings - Fork 258
68 lines (60 loc) · 1.89 KB
/
android.yml
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
# 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.5"
# 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.5"
- 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"