forked from stratum/stratum
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.08 KB
/
clang-format-check.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
44
name: "clang-format check"
on:
push:
branches:
- ffoulkes
- split-arch
pull_request:
branches:
- ffoulkes
- split-arch
concurrency:
# If workflow for PR or push is already running, stop it and start a new one.
group: clang-format-${{ github.ref }}
cancel-in-progress: true
jobs:
#---------------------------------------------------------------------
# clang-format-check
#---------------------------------------------------------------------
clang-format-check:
runs-on: ubuntu-latest
steps:
- name: Check out stratum repository
uses: actions/checkout@v4
- name: Get list of changed Files
id: changes
uses: tj-actions/changed-files@v45
with:
files_yaml: |
src:
- '**.c'
- '**.cc'
- '**.h'
- '!stratum/hal/lib/bcm/**'
- name: Check for formatting errors
run: |
for file in ${{ steps.changes.outputs.src_all_changed_files }}; do
clang-format --dry-run -Werror $file
done