Skip to content

Commit

Permalink
github: Add clang-format action
Browse files Browse the repository at this point in the history
Add an action to run clang-format on push/PR.

Signed-off-by: h67ma <[email protected]>
  • Loading branch information
h67ma committed Nov 26, 2023
1 parent 7a43098 commit 940a484
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: clang-format

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
clang_format:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y clang-format-13
- name: Run clang-format
run: clang-format-13 -style=file -Werror --dry-run ${{github.workspace}}/src/**/*.(hpp|cpp|c|h|h.in)

0 comments on commit 940a484

Please sign in to comment.