CodeChecks.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: CodeChecks
  2. on:
  3. pull_request:
  4. branches:
  5. - development
  6. paths:
  7. - ".github/workflows/CodeChecks.yml"
  8. - "Code/**"
  9. - "CMakeLists.txt"
  10. - ".licenserc.yaml"
  11. permissions:
  12. contents: read
  13. jobs:
  14. clang-format:
  15. name: Check code formatting with clang-format-13
  16. runs-on: ubuntu-20.04
  17. steps:
  18. - name: Clone the Gem repository
  19. uses: actions/checkout@v3
  20. - name: Clone the run-clang-format repository
  21. uses: actions/checkout@v3
  22. with:
  23. repository: Sarcasm/run-clang-format
  24. ref: 39081c9c42768ab5e8321127a7494ad1647c6a2f
  25. path: run-clang-format
  26. - name: Install clang-format-13
  27. run: |
  28. wget https://apt.llvm.org/llvm.sh
  29. chmod +x llvm.sh
  30. sudo ./llvm.sh 13
  31. sudo apt update && sudo apt install clang-format-13
  32. - name: Run the 'run-clang-format.py' file
  33. run: |
  34. cp run-clang-format/run-clang-format.py run-clang-format.py
  35. sudo rm -r run-clang-format
  36. ./run-clang-format.py -r --style=file --clang-format-executable=clang-format-13 Code
  37. license:
  38. name: Check license headers
  39. runs-on: ubuntu-latest
  40. steps:
  41. - uses: actions/checkout@v3
  42. - uses: apache/[email protected]
  43. with:
  44. mode: check
  45. config: .licenserc.yaml