Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Prepare
run: |
container=${{ container }}
RELEASE=${container##*:}
echo "RELEASE=${container##*:}" >> $GITHUB_ENV
clang-format --version | grep -F " version ${RELEASE}"

- name: Format source files
run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${CLANG_VERSION} -i
run: find include tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-${{ env.RELEASE }} -i

- name: Check for differences
id: assert
Expand Down Expand Up @@ -58,6 +65,6 @@ jobs:
in your repo, commit, and push.
run: |
echo "${PREAMBLE}"
clang-format-${CLANG_VERSION} --version
clang-format-${{ env.RELEASE }} --version
echo "${SUGGESTION}"
exit 1