clang_format.yml 434 B

1234567891011121314151617181920
  1. name: Check ClangFormat
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. workflow_dispatch:
  10. jobs:
  11. check_clang_format:
  12. runs-on: ubuntu-20.04
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Run ClangFormat
  16. run: find . | grep -E '\.(c|h|cc)$' | grep -E -v '^./(third_party|cmake)' | xargs clang-format -i
  17. - name: Check for differences
  18. run: git diff --exit-code