Merge remote-tracking branch 'upstream/main' #3
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: Code Style Checks | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| clang-format-check: | |
| name: Check code formatting | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install clang-format | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang-format-15 | |
| - name: Check formatting | |
| run: | | |
| git ls-files -- '*.cpp' '*.hpp' '*.h' '*.cc' | xargs clang-format-15 --dry-run --Werror | |
| clang-tidy-check: | |
| name: Static analysis with clang-tidy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang-tidy-15 | |
| - name: Generate compile_commands.json | |
| run: | | |
| mkdir build && cd build | |
| cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. | |
| mv compile_commands.json .. | |
| - name: Run clang-tidy | |
| run: | | |
| git ls-files -- '*.cpp' '*.hpp' '*.h' '*.cc' | xargs clang-tidy-15 -p . --config-file=.clang-tidy |