forked from liblouis/liblouis
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.06 KB
/
check-format.yml
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
37
38
39
40
41
42
43
name: Check format
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- '**.h'
- '**.c'
- 'liblouis/liblouis/liblouis.h.in'
pull_request:
branches: [ master ]
paths:
- '**.h'
- '**.c'
- 'liblouis/liblouis/liblouis.h.in'
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
check-format:
name: Check the code formatting
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Install dependencies
run: sudo apt-get update -qq && sudo apt-get install -y clang-format-14
- name: Autogen && configure
run: |
./autogen.sh
./configure
- name: Check format
run: |
make format-sources
git diff-index --exit-code HEAD -- .