From d38019ee6a77d17d161791dd6fd696a75fb1610e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 25 Nov 2022 10:48:24 +0100 Subject: [PATCH] Add basic CI support for build-testing the Android-based VR build. Note: Doesn't do APK generation, to keep things simple, instead using the old NDK build. Later should run gradle on github CI too, I guess. Fixes #15981 --- .github/workflows/build.yml | 12 ++++++++++++ android/jni/Android.mk | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d38a1ac0db..c4e7c10155 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -151,6 +151,18 @@ jobs: cxx: clang++ args: cd android && ./ab.sh -j2 APP_ABI=x86_64 UNITTEST=1 HEADLESS=1 id: android-x86_64 + - os: ubuntu-latest + extra: android + cc: clang + cxx: clang++ + args: cd android && ./ab.sh -j2 APP_ABI=arm64-v8a OPENXR=1 OPENXR_PLATFORM_QUEST=1 + id: android-vr-quest + - os: ubuntu-latest + extra: android + cc: clang + cxx: clang++ + args: cd android && ./ab.sh -j2 APP_ABI=arm64-v8a OPENXR=1 OPENXR_PLATFORM_PICO=1 + id: android-vr-pico - os: ubuntu-latest extra: android cc: clang diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 2fc73c6168..cc507e101d 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -739,6 +739,18 @@ ifeq ($(HEADLESS),1) include $(BUILD_EXECUTABLE) endif +ifeq ($(OPENXR),1) + LOCAL_CFLAGS += -DOPENXR +endif + +ifeq ($(OPENXR_PLATFORM_QUEST),1) + LOCAL_CFLAGS += -DOPENXR_PLATFORM_QUEST +endif + +ifeq ($(OPENXR_PLATFORM_PICO),1) + LOCAL_CFLAGS += -DOPENXR_PLATFORM_PICO +endif + ifeq ($(UNITTEST),1) include $(CLEAR_VARS) include $(LOCAL_PATH)/Locals.mk