-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] adds clang-format action (#833)
This patch adds an action that runs clang-format on pushes to main and when opening pull requests. The action runs `clang-format` with version `18.1.8` on the `src/` and `test/` folders. If the pushed code contains ill-formatted code, the actions displays the diff. Also adds the required steps in order to install clang-format-18 in the Dockerfile.
- Loading branch information
1 parent
39e98e5
commit 32d4204
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: check-clang-format | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: 'src test' | ||
exclude: './third_party ./external' | ||
extensions: 'h,cpp' | ||
clangFormatVersion: 18.1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters