Skip to content

Add android builds to CI, signature changes to xrlib instance #2

Add android builds to CI, signature changes to xrlib instance

Add android builds to CI, signature changes to xrlib instance #2

Workflow file for this run

# xrlib
# Vulkan is installed on the runner prior to compilation
name: Exclude optional module [ xrvk - pbr renderer ]
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
jobs:
desktop-builds:
name: Desktop builds [ Linux|Windows, g++|clang++|cl ]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
cpp_compiler: [g++, cl]
include:
- os: windows-latest
cpp_compiler: cl
- os: ubuntu-latest
cpp_compiler: g++
exclude:
- os: windows-latest
cpp_compiler: g++
- os: ubuntu-latest
cpp_compiler: cl
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Configure CMake on Linux
if: runner.os == 'Linux'
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DENABLE_XRVK=OFF \
-S ${{ github.workspace }}
- name: Configure CMake on Windows
if: runner.os == 'Windows'
run: |
cmake -B ${{ steps.strings.outputs.build-output-dir }} `
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} `
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
-DENABLE_XRVK=OFF `
-S ${{ github.workspace }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}
android-builds:
name: Android builds [ arm64-v8a, Debug|Release ]
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: android-arm64-v8a-${{ matrix.build_type }}-c++_shared
- name: Configure CMake on Android
run: |
cmake -S . -B build/ --toolchain $ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \
-D ANDROID_PLATFORM=26 \
-D CMAKE_ANDROID_ARCH_ABI=arm64-v8a \
-D CMAKE_ANDROID_STL_TYPE=c++_shared \
-D ANDROID_NDK=$ANDROID_NDK_ROOT \
-D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=NO \
-D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-D BUILD_TESTS=OFF \
-D UPDATE_DEPS=ON \
-D BUILD_WERROR=ON
env:
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
- run: cmake --build build/