name: Formatting check

on:
  push:
    paths-ignore:
      - "**/*.md"
      - '**/*.txt'
      - '3rdparty/*'
  pull_request:
    paths-ignore:
      - "**/*.md"
      - '**/*.txt'
      - '3rdparty/*'
  workflow_dispatch:

jobs:
  formatting-check:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4

    - name: Run clang-format
      uses: jidicula/clang-format-action@v4.15.0
      with:
        exclude-regex: (libspirv|3rdparty)
        clang-format-version: 20
