Experimental iOS Support #9836
Workflow file for this run
This file contains 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: | |
pull_request: | |
branches: [ master ] | |
paths: [ '**.cpp', '**.h' ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tidy: | |
name: Clang-Tidy | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 50 | |
- name: Install dependencies and clang-tidy | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext clang-tidy-15 | |
- name: Setup clang-tidy | |
run: | | |
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100 | |
sudo update-alternatives --install /usr/bin/clang-tidy-diff clang-tidy-diff /usr/bin/clang-tidy-diff-15.py 100 | |
- name: Prepare compile_commands.json | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_STRICT_COMPILATION=ON -DENABLE_IMAGE=ON -DENABLE_TOOLS=ON -DUSE_SDL_VERSION=SDL2 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | |
- name: Create results directory | |
run: | | |
mkdir clang-tidy-result | |
- name: Analyze | |
run: | | |
git diff -U0 HEAD^ | 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@v3 | |
with: | |
name: clang-tidy-result | |
path: clang-tidy-result/ | |
if-no-files-found: error |