Back merge #29
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: Linux CI22 | |
| on: | |
| push: | |
| branches: | |
| [ master, development ] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| env: | |
| GITHUB_CI_COMPATIBILITY_PATH: /usr/lib/x86_64-linux-gnu | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| BUILD_CONFIGURATION: [Debug, Release] | |
| steps: | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake ninja-build \ | |
| libsdl2-dev libsdl2-mixer-dev \ | |
| libsdl2-ttf-dev libsdl2-image-dev \ | |
| libgtest-dev \ | |
| libspdlog-dev libfmt-dev \ | |
| nlohmann-json3-dev \ | |
| clang-tidy \ | |
| libgtk-3-dev libgl1-mesa-dev | |
| - name: Install wxWidgets 3.2 from source | |
| run: | | |
| wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.6/wxWidgets-3.2.6.tar.bz2 | |
| tar -xf wxWidgets-3.2.6.tar.bz2 | |
| cd wxWidgets-3.2.6 | |
| ./configure --with-gtk=3 --with-opengl --disable-tests --prefix=/usr/local | |
| make -j$(nproc) | |
| sudo make install | |
| sudo ldconfig | |
| - name: Check Out Sources | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| path: src | |
| - name: Generate Build System - ${{matrix.BUILD_CONFIGURATION}} | |
| run: | | |
| cd ${{ github.workspace }} | |
| mkdir build_${{matrix.BUILD_CONFIGURATION}} | |
| cd build_${{matrix.BUILD_CONFIGURATION}} | |
| cmake -GNinja -DCMAKE_BUILD_TYPE=${{matrix.BUILD_CONFIGURATION}} -DUSE_64_BIT=True -DUNIT_TESTS=True -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DGITHUB_CI_COMPATIBILITY_PATH="${{env.GITHUB_CI_COMPATIBILITY_PATH}}" ${{ github.workspace }}/src | |
| - name: Build - ${{matrix.BUILD_CONFIGURATION}} | |
| run: | | |
| cd ${{ github.workspace }} | |
| cd build_${{matrix.BUILD_CONFIGURATION}} | |
| ninja | |
| - name: Run Unit Tests | |
| run: | | |
| cd ${{ github.workspace }} | |
| cd build_${{matrix.BUILD_CONFIGURATION}}/remc2-unit-test | |
| ./remc2-unit-test | |
| - name: Run Clang-Tidy | |
| if: startsWith(matrix.BUILD_CONFIGURATION, 'Debug') == true | |
| run: | | |
| cd ${{ github.workspace }} | |
| cd build_${{matrix.BUILD_CONFIGURATION}} | |
| run-clang-tidy -p . -j 4 -export-fixes clang-tidy-fixes.yaml | |
| - name: Run clang-tidy-pr-comments Action | |
| if: startsWith(matrix.BUILD_CONFIGURATION, 'Debug') == true | |
| uses: platisd/clang-tidy-pr-comments@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| clang_tidy_fixes: ${{ github.workspace }}/build_${{matrix.BUILD_CONFIGURATION}}/clang-tidy-fixes.yaml | |
| request_changes: false | |
| suggestions_per_comment: 10 |