-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (35 loc) · 1.36 KB
/
clang-format-test.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
name: clang-format-test
# Workflow CI to check clang-format.
# Important: it uses clang-format@16 on macos-latest
# and the .clang-format file included in the repo,
# using a different clang-format version might lead
# to issues.
on: [push]
jobs:
clang-format-test:
runs-on: macos-latest
steps:
- name: Check trigger
run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- name: Check runner
run: echo "This job is running on ${{ runner.os }}."
- name: Check runner OS
run: sw_vers -productVersion
- name: Check repo and branch
run: echo "Branch is ${{ github.ref }} and repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- name: brew install clang-format@16
run: brew install clang-format@16
- name: Dump clang-format location and version
run: |
which clang-format
clang-format --version
- name: Check clang-format over ATLHEBTB.cc
run: clang-format --dry-run --Werror ATLHECTB.cc
- name: Check clang-format over include/*.hh
run: clang-format --dry-run --Werror include/*.hh
- name: Check clang-format over src/*.cc
run: clang-format --dry-run --Werror src/*.cc
- name: Check job status
run: echo "Job is ${{ job.status }}."