Fix missing mutex header #611
This file contains hidden or 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: Build OpenAWE | |
| on: ['push', 'pull_request'] | |
| env: | |
| BUILD_TYPE: Release | |
| VCPKG_DEFAULT_TRIPLET: x64-windows | |
| VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' | |
| CCACHE_BASEDIR: ${{ github.workspace }} | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_COMPRESS: true | |
| CCACHE_COMPRESSLEVEL: 6 | |
| CCACHE_MAXSIZE: 400M | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Linux GCC | |
| os: ubuntu-24.04 | |
| compiler: gcc | |
| extra_cmake_args: | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_C_COMPILER=gcc \ | |
| -DCMAKE_CXX_COMPILER=g++ \ | |
| - name: Linux Clang | |
| os: ubuntu-24.04 | |
| compiler: clang | |
| extra_cmake_args: | | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_C_COMPILER=clang \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| - name: Windows MSVC | |
| os: windows-2022 | |
| extra_cmake_args: | | |
| -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake \ | |
| - name: MacOS x86 Clang | |
| os: macos-14 | |
| compiler: clang | |
| extra_cmake_args: | | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_C_COMPILER=clang \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DOPENAL_LIBRARY=/opt/homebrew/opt/openal-soft/lib/libopenal.dylib \ | |
| -DOPENAL_INCLUDE_DIR=/opt/homebrew/opt/openal-soft/include/AL \ | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: 'true' | |
| - name: Install dependencies with APT | |
| if: ${{ matrix.os == 'ubuntu-24.04' }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install \ | |
| libtinyxml2-dev \ | |
| zlib1g-dev \ | |
| libopenal-dev \ | |
| libglm-dev \ | |
| libbullet-dev \ | |
| libfmt-dev \ | |
| libogg-dev \ | |
| libtheora-dev \ | |
| libvorbis-dev \ | |
| libspdlog-dev \ | |
| liblz4-dev \ | |
| libgtest-dev \ | |
| libboost-dev \ | |
| glslc \ | |
| ccache \ | |
| libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev \ | |
| libwayland-dev wayland-protocols libxkbcommon-dev | |
| # Build and install glfw 3.4 | |
| # TODO: Remove this when glfw 3.4 is available | |
| git clone https://github.com/glfw/glfw.git --branch 3.4 && cd glfw && cmake -S . -B build && cmake --build build -j && sudo cmake --install build | |
| - name: Install dependencies with vcpkg | |
| if: ${{ matrix.os == 'windows-2022' }} | |
| shell: bash | |
| run: | | |
| vcpkg update | |
| nuget sources Add \ | |
| -source "https://nuget.pkg.github.com/${{ github.actor }}/index.json" \ | |
| -name "GitHub" \ | |
| -storepasswordincleartext \ | |
| -username "${{ github.actor }}" \ | |
| -password "${{ github.token }}" | |
| nuget setapikey "${{ github.token }}" \ | |
| -source "https://nuget.pkg.github.com/${{ github.actor }}/index.json" | |
| vcpkg install zlib glfw3 libogg libvorbis libtheora spdlog openal-soft bullet3 fmt gtest tinyxml2 glm opengl lz4 boost-dynamic-bitset boost-math boost-algorithm shaderc | |
| - name: Install dependencies with brew | |
| if: ${{ matrix.os == 'macos-14' }} | |
| run: | | |
| brew install zlib glfw libogg libvorbis theora spdlog openal-soft bullet fmt googletest tinyxml2 glm lz4 boost ccache shaderc | |
| - name: Cache non-Windows build with ccache | |
| if: ${{ matrix.os != 'windows-2019' }} | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{github.workspace}}/.ccache | |
| key: ${{ matrix.os }}-${{ matrix.compiler }}-build-compile-cache-${{ github.ref_name }}-${{ hashFiles('**/src/*.cpp', '**/src/*.h') }} | |
| restore-keys: | | |
| ${{ matrix.os }}-${{ matrix.compiler }}-build-compile-cache-${{ github.ref_name }}- | |
| ${{ matrix.os }}-${{ matrix.compiler }}-build-compile-cache-master- | |
| ${{ matrix.os }}-${{ matrix.compiler }}-build-compile-cache- | |
| - name: Configure CMake | |
| shell: bash | |
| run: | | |
| cmake -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.extra_cmake_args }} . | |
| - name: Build | |
| shell: bash | |
| run: cmake --build $GITHUB_WORKSPACE/build --config ${{env.BUILD_TYPE}} | |
| - name: Test | |
| working-directory: ${{github.workspace}}/build | |
| shell: bash | |
| run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | |
| - name: Pack Artifacts | |
| working-directory: ${{github.workspace}}/build | |
| shell: bash | |
| run: cpack | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: ${{github.workspace}}/build/*.zip |