Fix issue with only the first permission being requested #98
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to automatically create the godot openxr loaders addon | |
name: Build on push | |
on: | |
[push, pull_request] | |
jobs: | |
build: | |
name: Building for ${{ matrix.name }} (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- name: Linux (x86_64) | |
os: ubuntu-20.04 | |
platform: linux | |
flags: arch=x86_64 | |
artifact_name: build-files-linux-x86_64 | |
artifact_path: aar/demo/addons/godotopenxrvendors/*/.bin/*.so | |
# Not sure how to cross compile these | |
# - name: Linux (arm64) | |
# os: ubuntu-20.04 | |
# platform: linux | |
# flags: arch=arm64 | |
# artifact_name: build-files-linux-arm64 | |
# artifact_path: aar/demo/addons/godotopenxrvendors/*/.bin/*.so | |
# - name: Linux (rv64) | |
# os: ubuntu-20.04 | |
# platform: linux | |
# flags: arch=rv64 | |
# artifact_name: build-files-linux-rv64 | |
# artifact_path: aar/demo/addons/godotopenxrvendors/*/.bin/*.so | |
- name: Windows | |
os: windows-latest | |
platform: windows | |
artifact_name: build-files-windows | |
artifact_path: aar/demo/addons/godotopenxrvendors/*/.bin/*.dll | |
- name: MacOS | |
os: macos-11 | |
platform: macos | |
flags: arch=universal | |
artifact_name: build-files-macos | |
artifact_path: aar/demo/addons/godotopenxrvendors/*/.bin/*.framework | |
- name: Android | |
os: ubuntu-20.04 | |
platform: android | |
flags: arch=arm64 | |
artifact_name: build-files-android | |
artifact_path: aar/demo/addons/godotopenxrvendors/*/.bin/*/*.aar | |
# Note, to satisfy the asset library we need to make sure our zip files have a root folder | |
# this is why we checkout into aar and build into asset | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: aar | |
submodules: recursive | |
- name: Set up Python (for SCons) | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Android dependencies | |
uses: nttld/setup-ndk@v1 | |
with: | |
ndk-version: r23c | |
link-to-sdk: true | |
- name: Install scons | |
run: | | |
python -m pip install scons==4.0.0 | |
- name: Create extension library | |
run: | | |
cd aar | |
scons platform=${{ matrix.platform }} target=template_debug ${{ matrix.flags }} | |
scons platform=${{ matrix.platform }} target=template_release ${{ matrix.flags }} | |
cd .. | |
if: matrix.platform != 'android' | |
# On Android we build our loaders and build our extension with gradlew | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
if: matrix.platform == 'android' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
if: matrix.platform == 'android' | |
- name: Create Godot-CPP library | |
run: | | |
cd aar/thirdparty/godot-cpp | |
scons platform=${{ matrix.platform }} target=template_debug arch=arm64 | |
scons platform=${{ matrix.platform }} target=template_release arch=arm64 | |
scons platform=${{ matrix.platform }} target=template_debug arch=x86_64 | |
scons platform=${{ matrix.platform }} target=template_release arch=x86_64 | |
cd ../../.. | |
if: matrix.platform == 'android' | |
- name: Create Godot OpenXR Vendors AARs | |
run: | | |
cd aar | |
./gradlew build | |
cd .. | |
if: matrix.platform == 'android' | |
- name: Upload build files (artifacts) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.artifact_name }} | |
path: | | |
${{ matrix.artifact_path }} | |
# GODOT 4.2 ADDON GENERATION SECTION | |
asset: | |
name: Assembling the asset | |
runs-on: ubuntu-20.04 | |
needs: build | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: aar | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v3 | |
- name: Create Godot OpenXR Vendors Addon | |
run: | | |
mkdir asset | |
cp -r aar/demo/addons asset | |
cp aar/CHANGES.md asset/addons/godotopenxrvendors/GodotOpenXRVendors_CHANGES.md | |
- name: Adding vendor licences | |
run: | | |
cp aar/godotopenxrmeta/LICENSE.txt asset/addons/godotopenxrvendors/meta/ | |
cp aar/godotopenxrpico/libs/pico_openxr_sdk/arm64-v8a/README.md asset/addons/godotopenxrvendors/pico/LICENSE.md | |
cp aar/godotopenxrkhronos/LICENSE asset/addons/godotopenxrvendors/khronos/LICENSE | |
- name: Copying artifacts | |
run: | | |
cp -r build-files-android/khronos/.bin asset/addons/godotopenxrvendors/khronos/ | |
cp -r build-files-android/lynx/.bin asset/addons/godotopenxrvendors/lynx/ | |
cp -r build-files-android/meta/.bin asset/addons/godotopenxrvendors/meta/ | |
cp -r build-files-android/pico/.bin asset/addons/godotopenxrvendors/pico/ | |
cp build-files-linux-x86_64/khronos/.bin/*.so asset/addons/godotopenxrvendors/khronos/.bin/ | |
cp build-files-linux-x86_64/lynx/.bin/*.so asset/addons/godotopenxrvendors/lynx/.bin/ | |
cp build-files-linux-x86_64/meta/.bin/*.so asset/addons/godotopenxrvendors/meta/.bin/ | |
cp build-files-linux-x86_64/pico/.bin/*.so asset/addons/godotopenxrvendors/pico/.bin/ | |
cp build-files-windows/khronos/.bin/*.dll asset/addons/godotopenxrvendors/khronos/.bin/ | |
cp build-files-windows/lynx/.bin/*.dll asset/addons/godotopenxrvendors/lynx/.bin/ | |
cp build-files-windows/meta/.bin/*.dll asset/addons/godotopenxrvendors/meta/.bin/ | |
cp build-files-windows/pico/.bin/*.dll asset/addons/godotopenxrvendors/pico/.bin/ | |
cp -r build-files-macos/khronos/.bin/*.framework asset/addons/godotopenxrvendors/khronos/.bin/ | |
cp -r build-files-macos/lynx/.bin/*.framework asset/addons/godotopenxrvendors/lynx/.bin/ | |
cp -r build-files-macos/meta/.bin/*.framework asset/addons/godotopenxrvendors/meta/.bin/ | |
cp -r build-files-macos/pico/.bin/*.framework asset/addons/godotopenxrvendors/pico/.bin/ | |
- name: Create Godot OpenXR Vendor addon artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: GodotOpenXRVendorsAddon | |
path: | | |
asset | |
- name: Zip addon | |
run: | | |
zip -qq -r godotopenxrvendorsaddon.zip asset | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
- name: Create and upload asset | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: "godotopenxrvendorsaddon.zip" | |
omitNameDuringUpdate: true | |
omitBodyDuringUpdate: true | |
omitDraftDuringUpdate: true | |
omitPrereleaseDuringUpdate: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |