Skip to content

Commit e26bff8

Browse files
authored
Merge pull request #136 from KFilipek/task-code_style_check
[CI] Add coding style check as prerequisite
2 parents 95e9ea7 + 3347548 commit e26bff8

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

.github/workflows/basic.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
shared_library: 'OFF'
2525
- os: 'ubuntu-22.04'
2626
build_type: Release
27-
compiler: {c: clang, cxx: clang++}
27+
compiler: {c: clang, cxx: clang++}
2828
shared_library: 'OFF'
2929
- os: 'ubuntu-22.04'
3030
build_type: Release
@@ -156,14 +156,10 @@ jobs:
156156
cmake
157157
-B ${{env.BUILD_DIR}}
158158
-DCMAKE_BUILD_TYPE=Release
159-
-DUMF_FORMAT_CODE_STYLE=ON
159+
-DUMF_FORMAT_CODE_STYLE=OFF
160160
-DUMF_DEVELOPER_MODE=ON
161161
-DUMF_ENABLE_POOL_TRACKING=ON
162162
163-
- name: Run code-style check
164-
run: |
165-
cmake --build ${{env.BUILD_DIR}} --target clang-format-check
166-
167163
- name: Build UMF
168164
run: |
169165
cmake --build ${{env.BUILD_DIR}} -j $(sysctl -n hw.logicalcpu)

.github/workflows/pr_push.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,34 @@ 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+
5175
Spellcheck:
5276
uses: oneapi-src/unified-memory-framework/.github/workflows/spellcheck.yml@main
5377
Build:
54-
needs: [Spellcheck, FastBuild]
78+
needs: [Spellcheck, FastBuild, CodeStyle]
5579
uses: oneapi-src/unified-memory-framework/.github/workflows/basic.yml@main
5680
Benchmark:
5781
needs: [Build]

0 commit comments

Comments
 (0)