Skip to content

Commit b70921e

Browse files
committed
[CI] Add coding style check as prerequisite
1 parent 74fe7d0 commit b70921e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/pr_push.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,31 @@ jobs:
4848
- name: Build
4949
run: >
5050
cmake --build ${{github.workspace}}/build --config Release -j ${{matrix.nproc}}
51+
52+
CodeStyle:
53+
name: Coding style
54+
runs-on: ubuntu-latest
55+
56+
steps:
57+
- name: Checkout repository
58+
uses: actions/checkout@v4
59+
60+
- name: Install apt packages
61+
run: |
62+
sudo apt-get update
63+
sudo apt-get install -y cmake clang-format-15
64+
65+
- name: Configure CMake
66+
run: >
67+
cmake
68+
-B ${{github.workspace}}/build
69+
-DUMF_FORMAT_CODE_STYLE=ON
70+
71+
- name: Build
72+
run: >
73+
cmake --build build --target clang-format-check
74+
75+
5176
Spellcheck:
5277
uses: oneapi-src/unified-memory-framework/.github/workflows/spellcheck.yml@main
5378
Build:

0 commit comments

Comments
 (0)