Initial commit - base lib #1
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
# xrlib | |
# Vulkan is installed on the runner prior to compilation | |
name: Exclude optional module [ xrvk - pbr renderer ] | |
on: | |
push: | |
branches: [ "**" ] | |
pull_request: | |
branches: [ "**" ] | |
jobs: | |
build: | |
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 }} |