File: ci-format-check.yml

package info (click to toggle)
libavif 1.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 21,500 kB
  • sloc: ansic: 30,721; cpp: 14,588; xml: 1,507; sh: 1,265; java: 307; makefile: 57
file content (29 lines) | stat: -rw-r--r-- 1,031 bytes parent folder | download | duplicates (4)
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
name: CI Format Check
on: [push, pull_request]

permissions:
  contents: read

# Cancel the workflow if a new one is triggered from the same PR, branch, or tag, except on main.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
  clang-format-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: RafikFarhad/clang-format-github-action@40f11200e893c5e48dee28fbfe3da60d6862418d # v6
        with:
          style: file
          sources: "apps/*.c,apps/**/*.h,apps/**/*.c,apps/**/*.cc,examples/*.c,include/avif/*.h,src/*.c,tests/*.c,tests/**/*.h,tests/**/*.cc"
          excludes: "apps/shared/iccjpeg.h,apps/shared/iccjpeg.c"

  cmake-format-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: neg-c/cmake-format-action@v0.1.3
        with:
          exclude: libavif.pc.cmake