Implemented dynamic loading #2930
Workflow file for this run
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: tidy-format-validation | |
| on: [pull_request] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tidy-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y $(cat .github/workflows/apt-deps.txt) clang-tidy clang-format-14 | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ runner.os }}-ccache | |
| - name: Run clang-format | |
| run: | | |
| find src include -name "*.cpp" -o -name "*.h" | sed 's| |\\ |g' | xargs clang-format-14 -i | |
| git diff --exit-code | |
| - name: Install latest SDL | |
| run: | | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz | |
| tar -xzf SDL2-2.24.1.tar.gz | |
| cd SDL2-2.24.1 | |
| ./configure | |
| make -j 10 | |
| sudo make install | |
| - name: Install latest tinyxml2 | |
| run: | | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz | |
| tar -xzf 10.0.0.tar.gz | |
| cd tinyxml2-10.0.0 | |
| mkdir build | |
| cd build | |
| cmake .. | |
| make | |
| sudo make install | |
| - name: Install Python dependencies | |
| run: python3 -m pip install -r requirements.txt | |
| - name: Prepare compile_commands.json | |
| run: | | |
| cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
| cmake --build build --target GenerateScriptKeys | |
| - name: Create results directory | |
| run: | | |
| mkdir clang-tidy-result | |
| - name: Analyze | |
| run: | | |
| git diff -U0 HEAD^ -- 'src' 'include' ':!include/libultraship/color.h' ':!include/ship/utils/color.h' ':!include/libultraship/libultra/*' ':!src/libultraship/libultra/*' ':!src/fast/*' ':!include/fast/*' ':!src/ship/utils/AppleFolderManager.mm' | clang-tidy-diff -p1 -path build -export-fixes clang-tidy-result/fixes.yml | |
| - name: Save PR metadata | |
| run: | | |
| echo ${{ github.event.number }} > clang-tidy-result/pr-id.txt | |
| echo ${{ github.event.pull_request.head.repo.full_name }} > clang-tidy-result/pr-head-repo.txt | |
| echo ${{ github.event.pull_request.head.ref }} > clang-tidy-result/pr-head-ref.txt | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: clang-tidy-result | |
| path: clang-tidy-result/ |