[Extern/OpenXR] Added the OpenXR SDK 1.1.41 #1774
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
name: RaZ | |
on: [push, pull_request] | |
jobs: | |
######### | |
# Linux # | |
######### | |
linux: | |
name: "Linux (${{ matrix.compiler.c }}, ${{ matrix.build_type }}\ | |
${{ !matrix.use_audio && ', no audio' || '' }}\ | |
${{ !matrix.use_window && ', no window' || '' }})" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- { c: gcc, cpp: g++ } | |
- { c: clang, cpp: clang++ } | |
build_type: | |
- Debug | |
- Release | |
use_audio: | |
- true | |
use_window: | |
- true | |
include: | |
- { compiler: { c: gcc, cpp: g++ }, build_type: Debug, use_audio: false, use_window: true } | |
- { compiler: { c: gcc, cpp: g++ }, build_type: Debug, use_audio: true, use_window: false } | |
steps: | |
- uses: actions/checkout@v4 | |
# Installing the needed packages: | |
# - Ninja to build the project | |
# - GLEW & X11 as graphical dependencies | |
# - Lcov to output code coverage | |
# - Doxygen & Dot to generate the documentation | |
# - OpenAL-soft to handle the audio part | |
# - Xvfb to launch a headless server (allows GL context initialisation without a screen) | |
# - Gdb to run the unit tests with the debugger | |
# - Mesa-utils to get glxinfo | |
# Running glxinfo through xvfb to recover graphics capabilities | |
- name: Packages installation | |
run: | | |
sudo apt update && sudo apt install -y --no-install-recommends \ | |
ninja-build \ | |
libglew-dev libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev libxxf86vm-dev \ | |
lcov \ | |
doxygen python3-pydot \ | |
libopenal-dev \ | |
xvfb \ | |
gdb \ | |
mesa-utils && | |
xvfb-run -a glxinfo -B | |
# Installing the FBX SDK (in /usr) | |
# The installation asks for software user agreement (send 'yes'), then afterward if the README file should be opened (send 'n') | |
#- name: FBX SDK setup | |
# run: | | |
# wget http://download.autodesk.com/us/fbx/2019/2019.0/fbx20190_fbxsdk_linux.tar.gz -O ./fbx_sdk.tar.gz && | |
# tar xvf ./fbx_sdk.tar.gz && | |
# chmod +x ./fbx20190_fbxsdk_linux && | |
# printf 'yes\nn' | sudo ./fbx20190_fbxsdk_linux /usr | |
- name: Build setup | |
run: cmake -E make_directory ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
- name: Configuration | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
cmake -GNinja \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} \ | |
-DRAZ_BUILD_EXAMPLES=ON -DRAZ_GEN_DOC=ON \ | |
-DRAZ_USE_AUDIO=${{ matrix.use_audio && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_WINDOW=${{ matrix.use_window && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_IMGUI=${{ matrix.use_window && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_FBX=OFF -DRAZ_BUILD_TESTS=ON ${{ matrix.compiler.c == 'gcc' && '-DRAZ_ENABLE_COVERAGE=ON' || '' }} \ | |
-DSKIP_RENDERER_ERRORS=ON -DENABLE_DEBUG_INFO=ON \ | |
${{ github.workspace }} && | |
cmake --build . --target RaZ_PrintDebugInfo --config ${{ matrix.build_type }} | |
- name: Build | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
cmake --build . --config ${{ matrix.build_type }} && | |
pwd && find . | |
# Running all tests but rendering ones, using GDB to catch potential segfaults | |
# TODO: they are only run if windowing is enabled, as mesh loading functions notably depend on it to create mesh renderers, but they should not | |
- name: Test | |
if: matrix.use_window | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
ALSOFT_DRIVERS=null xvfb-run -a --server-args='-screen 0 1280x720x16' \ | |
gdb --batch --return-child-result -x '${{ github.workspace }}/tests/assets/debug/gdb_commands.txt' --args ./tests/RaZ_Tests ~[render] | |
# Running only rendering tests, using GDB to catch potential segfaults; only done if windowing is enabled, as rendering tests depend on a graphical context | |
- name: Test (rendering) | |
if: matrix.use_window | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
ALSOFT_DRIVERS=null xvfb-run -a --server-args='-screen 0 1280x720x16' \ | |
gdb --batch --return-child-result -x '${{ github.workspace }}/tests/assets/debug/gdb_commands.txt' --args ./tests/RaZ_Tests [render] | |
# Preparing code coverage; only done with GCC in Debug with all features enabled | |
- name: Coverage setup | |
if: matrix.compiler.c == 'gcc' && matrix.build_type == 'Debug' && matrix.use_audio && matrix.use_window | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
lcov -d ./CMakeFiles/RaZ.dir/src/ -c -o coverage.info && | |
lcov -r coverage.info '/usr/*' '${{ github.workspace }}/extern/*' -o coverage.info && | |
lcov -l coverage.info | |
# Processing code coverage; only done with GCC in Debug with all features enabled | |
- name: Coverage processing | |
if: matrix.compiler.c == 'gcc' && matrix.build_type == 'Debug' && matrix.use_audio && matrix.use_window | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ runner.workspace }}/build-${{ matrix.compiler.c }}/coverage.info | |
# Installing RaZ in the build directory; default is /usr/local | |
- name: Install | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: sudo cmake --install . --prefix ./ --config ${{ matrix.build_type }} | |
- name: Upload build | |
if: matrix.use_audio && matrix.use_window | |
uses: actions/upload-artifact@v4 | |
with: | |
name: RaZ-linux-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.sha }} | |
path: | | |
${{ runner.workspace }}/build-${{ matrix.compiler.c }}/include | |
${{ runner.workspace }}/build-${{ matrix.compiler.c }}/lib | |
########### | |
# Windows # | |
########### | |
windows: | |
name: "Windows (${{ matrix.compiler.c }}, ${{ matrix.build_type }}\ | |
${{ !matrix.use_audio && ', no audio' || '' }}\ | |
${{ !matrix.use_window && ', no window' || '' }})" | |
runs-on: windows-2022 | |
env: | |
OPENAL_VERSION: 1.23.1 | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- { c: cl, cpp: cl } | |
build_type: | |
- Debug | |
- Release | |
use_audio: | |
- true | |
use_window: | |
- true | |
include: | |
- { compiler: { c: cl, cpp: cl }, build_type: Debug, use_audio: false, use_window: true } | |
- { compiler: { c: cl, cpp: cl }, build_type: Debug, use_audio: true, use_window: false } | |
steps: | |
- uses: actions/checkout@v4 | |
# Caching OpenAL-Soft's installation; this avoids reinstalling it on every build | |
- name: OpenAL-Soft caching | |
if: matrix.use_audio | |
uses: actions/cache@v4 | |
id: openal-soft | |
with: | |
path: C:/OpenAL | |
key: openal-soft-${{ env.OPENAL_VERSION }} | |
restore-keys: | | |
openal-soft-${{ env.OPENAL_VERSION }} | |
# Downloading & installing OpenAL-Soft to handle the audio part; only done when failed to find its cached installation | |
- name: OpenAL-Soft setup | |
if: matrix.use_audio && steps.openal-soft.outputs.cache-hit != 'true' | |
run: | | |
curl -sSkLO https://github.com/kcat/openal-soft/releases/download/${{ env.OPENAL_VERSION }}/openal-soft-${{ env.OPENAL_VERSION }}-bin.zip && | |
7z x openal-soft-${{ env.OPENAL_VERSION }}-bin.zip && | |
mv openal-soft-${{ env.OPENAL_VERSION }}-bin C:/OpenAL | |
- name: Build setup | |
run: cmake -E make_directory ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
- name: Configuration | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
cmake -G"Visual Studio 17 2022" -A x64 \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DRAZ_BUILD_EXAMPLES=ON -DRAZ_GEN_DOC=OFF \ | |
-DRAZ_USE_AUDIO=${{ matrix.use_audio && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_WINDOW=${{ matrix.use_window && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_IMGUI=${{ matrix.use_window && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_FBX=OFF -DRAZ_BUILD_TESTS=ON \ | |
-DSKIP_RENDERER_ERRORS=ON -DENABLE_DEBUG_INFO=ON \ | |
$GITHUB_WORKSPACE && | |
cmake --build . --target RaZ_PrintDebugInfo --config ${{ matrix.build_type }} | |
- name: Build | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
cmake --build . --config ${{ matrix.build_type }} && | |
pwd && find . | |
- name: Install | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: cmake --install . --prefix C:/RaZ --config ${{ matrix.build_type }} | |
- name: Upload build | |
if: matrix.use_audio && matrix.use_window | |
uses: actions/upload-artifact@v4 | |
with: | |
name: RaZ-windows-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.sha }} | |
path: | | |
C:/RaZ | |
######### | |
# macOS # | |
######### | |
macos: | |
name: "macOS (${{ matrix.compiler.c }}, ${{ matrix.build_type }}\ | |
${{ !matrix.use_audio && ', no audio' || '' }}\ | |
${{ !matrix.use_window && ', no window' || '' }})" | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- { c: clang, cpp: clang++ } | |
build_type: | |
- Debug | |
- Release | |
use_audio: | |
- true | |
use_window: | |
- true | |
include: | |
- { compiler: { c: clang, cpp: clang++ }, build_type: Debug, use_audio: false, use_window: true } | |
- { compiler: { c: clang, cpp: clang++ }, build_type: Debug, use_audio: true, use_window: false } | |
steps: | |
- uses: actions/checkout@v4 | |
# Installing the needed packages: | |
# - Ninja to build the project | |
# - OpenAL-soft to handle the audio part | |
- name: Packages installation | |
run: | | |
HOMEBREW_NO_AUTO_UPDATE=1 brew install \ | |
ninja \ | |
openal-soft | |
- name: Build setup | |
run: cmake -E make_directory ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
- name: Configuration | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
cmake -GNinja \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} \ | |
-DRAZ_BUILD_EXAMPLES=ON -DRAZ_GEN_DOC=OFF \ | |
-DRAZ_USE_AUDIO=${{ matrix.use_audio && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_WINDOW=${{ matrix.use_window && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_IMGUI=${{ matrix.use_window && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_FBX=OFF -DRAZ_BUILD_TESTS=ON \ | |
-DSKIP_RENDERER_ERRORS=ON -DENABLE_DEBUG_INFO=ON \ | |
$GITHUB_WORKSPACE && | |
cmake --build . --target RaZ_PrintDebugInfo --config ${{ matrix.build_type }} | |
- name: Build | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
shell: bash | |
run: | | |
cmake --build . --config ${{ matrix.build_type }} && | |
pwd && find . | |
# Installing RaZ in the build directory; default is /usr/local | |
- name: Install | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: sudo cmake --install . --prefix ./ --config ${{ matrix.build_type }} | |
- name: Upload build | |
if: matrix.use_audio && matrix.use_window | |
uses: actions/upload-artifact@v4 | |
with: | |
name: RaZ-macos-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.sha }} | |
path: | | |
${{ runner.workspace }}/build-${{ matrix.compiler.c }}/include | |
${{ runner.workspace }}/build-${{ matrix.compiler.c }}/lib | |
############## | |
# Emscripten # | |
############## | |
emscripten: | |
name: "Emscripten (${{ matrix.compiler.c }}, ${{ matrix.build_type }}\ | |
${{ !matrix.use_audio && ', no audio' || '' }})" | |
runs-on: ubuntu-latest | |
env: | |
EMSCRIPTEN_VERSION: 3.1.0 # The 'latest' version may fail to build | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- { c: emcc, cpp: em++ } | |
build_type: | |
- Debug | |
- Release | |
use_audio: | |
- true | |
include: | |
- { compiler: { c: emcc, cpp: em++ }, build_type: Debug, use_audio: false } | |
steps: | |
- uses: actions/checkout@v4 | |
# Installing the needed packages: | |
# - Ninja to build the project | |
# - GL & X11 as needed graphical dependencies | |
# - OpenAL-soft to handle the audio part | |
- name: Packages installation | |
run: | | |
sudo apt update && sudo apt install -y --no-install-recommends \ | |
ninja-build \ | |
libglew-dev libxi-dev libxcursor-dev libxrandr-dev libxinerama-dev libxxf86vm-dev \ | |
libopenal-dev | |
#- name: FBX SDK setup | |
# run: | | |
# wget http://download.autodesk.com/us/fbx/2019/2019.0/fbx20190_fbxsdk_linux.tar.gz -O ./fbx_sdk.tar.gz && | |
# tar xvf ./fbx_sdk.tar.gz && | |
# chmod +x ./fbx20190_fbxsdk_linux && | |
# printf 'yes\nn' | ./fbx20190_fbxsdk_linux /usr | |
# Caching Emscripten's installation; this avoids reinstalling it on every build | |
- name: Emscripten caching | |
uses: actions/cache@v4 | |
id: emsdk | |
with: | |
path: ~/emsdk | |
key: emsdk-${{ env.EMSCRIPTEN_VERSION }} | |
restore-keys: | | |
emsdk-${{ env.EMSCRIPTEN_VERSION }} | |
# Downloading & installing Emscripten; only done when failed to find its cached installation | |
- name: Emscripten setup | |
if: steps.emsdk.outputs.cache-hit != 'true' | |
shell: bash | |
run: | | |
git clone --depth 1 https://github.com/emscripten-core/emsdk.git ~/emsdk && | |
~/emsdk/emsdk install ${{ env.EMSCRIPTEN_VERSION }} && ~/emsdk/emsdk activate ${{ env.EMSCRIPTEN_VERSION }} | |
- name: Build setup | |
shell: bash | |
run: cmake -E make_directory ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
- name: Configuration | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
source ~/emsdk/emsdk_env.sh && | |
emcmake cmake -GNinja \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DRAZ_BUILD_EXAMPLES=ON -DRAZ_GEN_DOC=OFF \ | |
-DRAZ_USE_AUDIO=${{ matrix.use_audio && 'ON' || 'OFF' }} \ | |
-DRAZ_USE_FBX=OFF -DRAZ_BUILD_TESTS=ON ${{ matrix.build_type == 'Debug' && '-DRAZ_EMSCRIPTEN_DEBUG_FAST_LINK=ON' || '' }} \ | |
-DSKIP_RENDERER_ERRORS=ON -DENABLE_DEBUG_INFO=ON \ | |
$GITHUB_WORKSPACE && | |
cmake --build . --target RaZ_PrintDebugInfo --config ${{ matrix.build_type }} | |
- name: Build | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build-${{ matrix.compiler.c }} | |
run: | | |
cmake --build . --config ${{ matrix.build_type }} && | |
pwd && find . |