Add clang-tidy check GH Actions workflow #1
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: Clang-Tidy | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| git-ref: | ||
| description: A commit, branch or tag to build. | ||
| type: string | ||
| required: true | ||
| workflow_call: | ||
| inputs: | ||
| git-ref: | ||
| description: A commit, branch or tag to build. | ||
| type: string | ||
| required: true | ||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| container: silkeh/clang | ||
| steps: | ||
| # - name: Set up Python | ||
| # uses: actions/setup-python@v5 | ||
| # with: | ||
| # python-version: '3.13' | ||
| - run: | | ||
| apt-get update | ||
| apt-get install python3 python3-pip | ||
| - name: Set up SCons | ||
| shell: bash | ||
| run: | | ||
| python3 -c "import sys; print(sys.version)" | ||
| python3 -m pip install scons==4.7.0 | ||
| scons --version | ||
| - name: Checkout project | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| ref: ${{ inputs.git-ref }} | ||
| - name: Run Clang-Tidy | ||
| shell: sh | ||
| run: | | ||
| ./compile_debug.sh compiledb | ||
| ./run_clang_tidy.sh -warnings-as-errors '*' | ||