Skip to content

Commit a6ea46d

Browse files
committed
[CI] Add coding style check as prerequisite
1 parent d940c5e commit a6ea46d

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

.github/workflows/pr_push.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: PR/push
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.head_ref }}-${{ github.workflow }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
FastBuild:
11+
name: Fast build
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest]
15+
include:
16+
- os: ubuntu-latest
17+
nproc: $(nproc)
18+
pool_scalable: 'ON'
19+
jemalloc: 'ON'
20+
- os: windows-latest
21+
nproc: $Env:NUMBER_OF_PROCESSORS
22+
pool_scalable: 'OFF'
23+
jemalloc: 'OFF'
24+
runs-on: ${{matrix.os}}
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Install apt packages
31+
if: matrix.os == 'ubuntu-latest'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y cmake libjemalloc-dev libnuma-dev libtbb-dev
35+
36+
- name: Configure CMake
37+
run: >
38+
cmake
39+
-B ${{github.workspace}}/build
40+
-DCMAKE_BUILD_TYPE=Release
41+
-DUMF_FORMAT_CODE_STYLE=OFF
42+
-DUMF_DEVELOPER_MODE=ON
43+
-DUMF_ENABLE_POOL_TRACKING=ON
44+
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=${{matrix.pool_scalable}}
45+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
46+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=${{matrix.jemalloc}}
47+
48+
- name: Build
49+
run: >
50+
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 libjemalloc-dev libnuma-dev libtbb-dev
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+
working-directory: ${{github.workspace}}/build
73+
run: >
74+
make clang-format-check
75+
76+
Spellcheck:
77+
uses: oneapi-src/unified-memory-framework/.github/workflows/spellcheck.yml@main
78+
Build:
79+
needs: [Spellcheck, FastBuild]
80+
uses: oneapi-src/unified-memory-framework/.github/workflows/basic.yml@main
81+
Benchmark:
82+
needs: [Build]
83+
uses: oneapi-src/unified-memory-framework/.github/workflows/benchmarks.yml@main
84+
CodeQL:
85+
needs: [Build]
86+
uses: oneapi-src/unified-memory-framework/.github/workflows/codeql.yml@main

0 commit comments

Comments
 (0)