Add formatting checks for PRs

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2026-07-02 15:22:56 +03:00
parent 14873489ed
commit 720d3edfe3
2 changed files with 25 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
name: Format checks
on:
pull_request:
branches:
- master
jobs:
format:
name: Format
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: git checkout
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Check clang-format
run: |
nix develop -c sh -lc 'git ls-files "*.cpp" "*.hpp" "*.cppm" | xargs clang-format --dry-run --Werror'
- name: Check cmake-format
run: |
nix develop -c sh -lc 'cmake-format --check CMakeLists.txt src/modules/CMakeLists.txt cmake/smathConfig.cmake.in'