Skip to content

Commit 0810f26

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

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/workflows/pr_push.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
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+
CodeStyle:
49+
name: Coding style
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
- name: Install apt packages
57+
run: |
58+
sudo apt-get update
59+
sudo apt-get install -y cmake clang-format-15 libjemalloc-dev libnuma-dev libtbb-dev
60+
61+
- name: Configure CMake
62+
run: >
63+
cmake
64+
-B ${{github.workspace}}/build
65+
-DUMF_FORMAT_CODE_STYLE=ON
66+
67+
- name: Build
68+
working-directory: ${{github.workspace}}/build
69+
run: >
70+
make clang-format-check
71+
72+
Spellcheck:
73+
uses: oneapi-src/unified-memory-framework/.github/workflows/spellcheck.yml@main
74+
Build:
75+
needs: [Spellcheck, FastBuild]
76+
uses: oneapi-src/unified-memory-framework/.github/workflows/basic.yml@main
77+
Benchmark:
78+
needs: [Build]
79+
uses: oneapi-src/unified-memory-framework/.github/workflows/benchmarks.yml@main
80+
CodeQL:
81+
needs: [Build]
82+
uses: oneapi-src/unified-memory-framework/.github/workflows/codeql.yml@main

0 commit comments

Comments
 (0)