format.yml 655 B

12345678910111213141516171819202122232425
  1. name: Format
  2. on:
  3. push:
  4. pull_request:
  5. jobs:
  6. clang-format:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - name: Check out repository
  10. uses: actions/checkout@v4
  11. - name: Install clang-format
  12. # Pinned to 18 so CI matches the version contributors run locally;
  13. # clang-format output differs between major versions.
  14. run: |
  15. sudo apt-get update
  16. sudo apt-get install -y clang-format-18
  17. - name: Check formatting
  18. # Fails the job (and blocks the PR) the moment any file differs from
  19. # the Linux kernel .clang-format style. Run `make format` to fix.
  20. run: make format-check