From 883a28387e7f9b91d7a4ec84f098293b316be829 Mon Sep 17 00:00:00 2001 From: Donghyeon Jeong Date: Thu, 16 Jan 2025 09:36:45 +0900 Subject: [PATCH] [CI] Remove duplicate clang-format checks This commit aims to eliminate duplicate clang-format checks, which can lead to mismatches. Additionally, it updates the cpp-linter workflow script to run on Ubuntu 22.04 instead of the latest version. **Changes proposed in this PR:** - Remove the C++ checker from the static checker. - Update cpp-linter to operate on Ubuntu 22.04 and disable clang-tidy checks. **Self-evaluation:** 1. Build test: [ ]Passed [ ]Failed [X]Skipped 2. Run test: [ ]Passed [ ]Failed [X]Skipped Signed-off-by: Donghyeon Jeong --- .github/workflows/cpp_linter.yml | 3 ++- .github/workflows/static.check.yml | 25 ------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cpp_linter.yml b/.github/workflows/cpp_linter.yml index 6a3cdc9539..14b8e59866 100644 --- a/.github/workflows/cpp_linter.yml +++ b/.github/workflows/cpp_linter.yml @@ -4,7 +4,7 @@ on: pull_request jobs: cpp-linter: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: install dev packages @@ -23,6 +23,7 @@ jobs: file-annotations: false step-summary: true format-review: true + tidy-checks: '-*' # disable clang-tidy checks. - name: failing fast if: steps.linter.outputs.clang-format-checks-failed > 0 diff --git a/.github/workflows/static.check.yml b/.github/workflows/static.check.yml index d1d5107e23..4ccd9ef7df 100644 --- a/.github/workflows/static.check.yml +++ b/.github/workflows/static.check.yml @@ -41,31 +41,6 @@ jobs: done echo "::endgroup::" echo "changed_file_list=${tmpfile}" >> "$GITHUB_ENV" - - name: /Checker/ clang-format for .cc/.hh/.hpp/.cpp files - # Originally from "pr-prebuild-clang" - # Need "clang-format" - run: | - echo "Check .clang-format file" - if [ ! -f ".clang-format" ]; then - echo "::error .clang-format file not found" - exit 1 - fi - for file in `cat $changed_file_list`; do - echo "Checking $file" - if [[ "$file" =~ .*\.hh$ ]] || [[ "$file" =~ .*\.hpp ]] || [[ "$file" =~ .*\.cc$ ]] || [[ "$file" =~ .*\.cpp ]]; then - clang-format -i ${file} - fi - done - git diff -- *.cc *.hh *.hpp *.cpp > .ci.clang-format.patch - SIZE=$(stat -c%s .ci.clang-format.patch) - if [[ $SIZE -ne 0 ]]; then - echo "::group::The clang-format complaints..." - cat .ci.clang-format.patch - echo "::endgroup::" - echo "::error clang-format has found style errors in C++ files." - exit 1 - fi - echo "clang-format shows no style errors." - name: /Checker/ File size check # Originally from "pr-prebuild-file-size" run: |