diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml new file mode 100644 index 0000000..f1951a5 --- /dev/null +++ b/.github/workflows/clang-format-check.yml @@ -0,0 +1,17 @@ +name: clang-format +on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} + cancel-in-progress: true +jobs: + formatting-check: + name: Formatting check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run clang-format style check for C/C++/Protobuf programs. + uses: jidicula/clang-format-action@v4.11.0 + with: + clang-format-version: '18' + exclude-regex: '(tests\/catch_*.*pp|benchmarks\/catch_*.*pp)' + include-regex: '(include\/hpcombi\/*.hpp|tests\/*.cpp|benchmarks\/*.cpp|examples\/*.cpp|examples\/*.h)'