From 7acc5725d1ee624699ffd2277b0f357e795475cc Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 26 Feb 2024 22:24:08 -0300 Subject: [PATCH] Add clang tidy in CI --- .github/workflows/clang-tidy.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/clang-tidy.yml diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml new file mode 100644 index 000000000..72bc651d5 --- /dev/null +++ b/.github/workflows/clang-tidy.yml @@ -0,0 +1,37 @@ +name: build +on: + pull_request_target: + paths: + - '**.cpp' + - '**.h' + - '.github/workflows/clang-tidy.yml' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + - name: Install Dependencies + shell: bash + run: | + sudo apt-get update -qq + sudo apt-get install -y \ + libc++-dev libc++abi-dev \ + libpixman-1-dev libfreetype6-dev libharfbuzz-dev zlib1g-dev \ + libx11-dev libxcursor-dev libxi-dev libgl1-mesa-dev + - uses: ilammy/msvc-dev-cmd@v1 + if: runner.os == 'Windows' + - uses: turtlesec-no/get-ninja@main + - uses: ZedThree/clang-tidy-review@v0.17.1 + id: review + with: + token: ${{ secrets.CLANG_TIDY_TOKEN }} + cmake_command: | + cmake . -G Ninja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DLAF_BACKEND=none + - uses: ZedThree/clang-tidy-review/upload@v0.17.1 + id: upload-review + - if: steps.review.outputs.total_comments > 0 + run: exit 1