blob: bbd87ecb7acc1072e9222f62de62d51b9ce21d31 [file] [log] [blame] [edit]
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: RafikFarhad/clang-format-github-action@bf3713d4b192d5d8f0297bfed74fb3e7de41cf29 # v5
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: neg-c/cmake-format-action@v0.1.3
with:
exclude: libavif.pc.cmake