summaryrefslogtreecommitdiff
path: root/.github/workflows/clang-format.yml
blob: 604a3dd7038b97068ea67b47ba5e8fa5bbee9451 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
name: clang-format
on: [pull_request]
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  clang-format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 2
      - name: Install clang-format
        run: |
          sudo apt-get update
          sudo apt-get install -y clang-format-14
      - name: Run clang-format
        run: |
          ./run-clang-format.sh
          git diff --exit-code