From 4a649d2846177ce04cd303f9c62183cef3311c03 Mon Sep 17 00:00:00 2001 From: Denis Patrakeev <72223799+den-patrakeev@users.noreply.github.com> Date: Thu, 26 Dec 2024 15:22:36 +0300 Subject: [PATCH 1/3] test clang-tidy --- .github/workflows/check_clang_tidy_on_pr.yml | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/check_clang_tidy_on_pr.yml diff --git a/.github/workflows/check_clang_tidy_on_pr.yml b/.github/workflows/check_clang_tidy_on_pr.yml new file mode 100644 index 000000000..33c84d382 --- /dev/null +++ b/.github/workflows/check_clang_tidy_on_pr.yml @@ -0,0 +1,30 @@ +name: Static Application Security Testing + +on: [pull_request] + +jobs: + clang-tidy: + name: Check sources by clang-format for added/changed files in PR + runs-on: ubuntu-latest + steps: + - name: Checkout repository code + uses: actions/checkout@v4 + + - name: Prepare third party libs + run: bash thirdparty-deploy.sh + + - name: Check project by clang-tidy + id: review + uses: ZedThree/clang-tidy-review@v0.20.1 + with: + apt_packages: 'build-essential,git,cmake,curl,pkg-config,zlib1g-dev,libpng-dev,libjpeg-dev,libfreetype6-dev,libfontconfig1-dev,libharfbuzz-dev,libfribidi-dev,libunibreak-dev,libzstd-dev,libutf8proc-dev,qtbase5-dev,qttools5-dev' + build_dir: 'qtbuild' + cmake_command: 'cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=on -D GUI=QT5 -D CMAKE_BUILD_TYPE=Release -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=/usr ..' + + - name: Uploads an artefact containing clang_fixes.json + id: upload-review + uses: ZedThree/clang-tidy-review/upload@v0.20.1 + + - name: Check for fail + if: steps.review.outputs.total_comments > 0 + run: exit 1 From b10045dd24d17a9a80fa68695b1d485538bcd50a Mon Sep 17 00:00:00 2001 From: Denis Patrakeev <72223799+den-patrakeev@users.noreply.github.com> Date: Thu, 26 Dec 2024 15:24:15 +0300 Subject: [PATCH 2/3] test clang-tidy 2 --- .github/workflows/check_clang_tidy_on_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_clang_tidy_on_pr.yml b/.github/workflows/check_clang_tidy_on_pr.yml index 33c84d382..f0fbf419a 100644 --- a/.github/workflows/check_clang_tidy_on_pr.yml +++ b/.github/workflows/check_clang_tidy_on_pr.yml @@ -4,7 +4,7 @@ on: [pull_request] jobs: clang-tidy: - name: Check sources by clang-format for added/changed files in PR + name: Check sources by clang-tidy on PR runs-on: ubuntu-latest steps: - name: Checkout repository code From 21036cf903ec0a13308acb923774083d627ce0c6 Mon Sep 17 00:00:00 2001 From: Denis Patrakeev <72223799+den-patrakeev@users.noreply.github.com> Date: Thu, 26 Dec 2024 15:31:45 +0300 Subject: [PATCH 3/3] test clang-tidy 3 --- .github/workflows/check_clang_tidy_on_pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_clang_tidy_on_pr.yml b/.github/workflows/check_clang_tidy_on_pr.yml index f0fbf419a..517836070 100644 --- a/.github/workflows/check_clang_tidy_on_pr.yml +++ b/.github/workflows/check_clang_tidy_on_pr.yml @@ -11,7 +11,9 @@ jobs: uses: actions/checkout@v4 - name: Prepare third party libs - run: bash thirdparty-deploy.sh + run: | + chmod +x "${GITHUB_WORKSPACE}/thirdparty-deploy.sh" + "${GITHUB_WORKSPACE}/thirdparty-deploy.sh" - name: Check project by clang-tidy id: review