Skip to content

Commit

Permalink
[CI] Remove duplicate clang-format checks
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
djeong20 authored and jijoongmoon committed Jan 17, 2025
1 parent 9dd61af commit c603787
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cpp_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
25 changes: 0 additions & 25 deletions .github/workflows/static.check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit c603787

Please sign in to comment.