File: clangformat.yml

package info (click to toggle)
simdutf 7.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,244 kB
  • sloc: cpp: 60,074; ansic: 14,226; python: 3,364; sh: 321; makefile: 12
file content (36 lines) | stat: -rw-r--r-- 956 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: clang format

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  format:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - name: run clang format in docker
        run: |
          scripts/clang_format_docker.sh
      - name: check for differences
        run: |
          git diff >clang-format.patch
          if [ $(wc -c <clang-format.patch) -ne 0 ] ; then
             echo "there was a formatting issue."
             cat /etc/os-release
             echo "you may download the artifact and apply it with git apply"
             cat clang-format.patch
             exit 1
          else
             rm clang-format.patch
          fi
      - name: store patch as artifact if there is one
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: clang-format.patch
          path: clang-format.patch
          if-no-files-found: ignore