[RaZ] Updated RaZ (commit b8354bc) #97
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: RaZor - Linux | |
on: [push, pull_request] | |
jobs: | |
linux: | |
name: Linux (${{ matrix.compiler.c }}, ${{ matrix.build_type }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- { c: gcc, cpp: g++ } | |
- { c: clang, cpp: clang++ } | |
build_type: | |
- Debug | |
- Release | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Pulling RaZ | |
run: git submodule update --init --recursive | |
# Defining the timezone to Europe/Paris, which is required by apt (Ubuntu 20.04): | |
# sudo ln -snf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone | |
# Installing the needed packages: | |
# - Ninja to build the project | |
# - GLEW & X11 as graphical dependencies | |
# - OpenAL-soft to handle the audio part | |
# Installing Qt5 for RaZor | |
- 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 \ | |
qtbase5-dev qttools5-dev | |
# 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_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | |
-DRAZOR_BUILD_RAZ=ON \ | |
-DRAZ_USE_AUDIO=ON \ | |
-DENABLE_DEBUG_INFO=ON \ | |
$GITHUB_WORKSPACE && | |
cmake --build . --target RaZor_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 . | |
# Installing RaZor 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 }} | |
# Making an archive to maintain file permissions & avoiding weird paths | |
# Additional dependencies are libc & libm (located in /usr/lib*), as well as libgcc_s & libstdc++ (which would require another package) | |
- name: Packaging build | |
run: | | |
mkdir RaZor-linux-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.run_id }}/ && | |
cp -t RaZor-linux-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.run_id }}/ \ | |
${{ runner.workspace }}/build-${{ matrix.compiler.c }}/RaZor \ | |
${{ runner.workspace }}/build-${{ matrix.compiler.c }}/*.qm \ | |
/usr/lib/*/libQt5Core.so \ | |
/usr/lib/*/libQt5Gui.so \ | |
/usr/lib/*/libQt5Widgets.so \ | |
/usr/lib/*/libGL.so \ | |
/usr/lib/*/libopenal.so | |
tar -cvf RaZor-linux-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.run_id }}.tar \ | |
RaZor-linux-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.run_id }}/ | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: RaZor-linux-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.run_id }} | |
path: RaZor-linux-${{ matrix.compiler.c }}-${{ matrix.build_type }}-${{ github.run_id }}.tar |