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: 6 additions & 5 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,24 @@ jobs:
release:
- 18
container: libfn/ci-build-clang:${{ matrix.release }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- name: Check version
run: |
echo "CLANG_RELEASE=${{ matrix.release }}" >> $GITHUB_ENV
CLANG_RELEASE=${{ matrix.release }}
clang-format --version | grep -F "clang-format version ${CLANG_RELEASE}"

- uses: actions/checkout@v4
clang-format-${CLANG_RELEASE} --version | grep -F "clang-format version ${CLANG_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_RELEASE} -i

- name: Check for differences
id: assert
shell: bash
run: |
set -o pipefail
git diff --exit-code | tee "clang-format.patch"

- name: Upload patch
Expand Down