Skip to content

[CI] Add coding style check as prerequisite #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
shared_library: 'OFF'
- os: 'ubuntu-22.04'
build_type: Release
compiler: {c: clang, cxx: clang++}
compiler: {c: clang, cxx: clang++}
shared_library: 'OFF'
- os: 'ubuntu-22.04'
build_type: Release
Expand Down Expand Up @@ -156,14 +156,10 @@ jobs:
cmake
-B ${{env.BUILD_DIR}}
-DCMAKE_BUILD_TYPE=Release
-DUMF_FORMAT_CODE_STYLE=ON
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_ENABLE_POOL_TRACKING=ON

- name: Run code-style check
run: |
cmake --build ${{env.BUILD_DIR}} --target clang-format-check

- name: Build UMF
run: |
cmake --build ${{env.BUILD_DIR}} -j $(sysctl -n hw.logicalcpu)
26 changes: 25 additions & 1 deletion .github/workflows/pr_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,34 @@ jobs:
- name: Build
run: >
cmake --build ${{github.workspace}}/build --config Release -j ${{matrix.nproc}}

CodeStyle:
name: Coding style
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y cmake clang-format-15

- name: Configure CMake
run: >
cmake
-B ${{github.workspace}}/build
-DUMF_FORMAT_CODE_STYLE=ON

- name: Build
run: >
cmake --build build --target clang-format-check

Spellcheck:
uses: oneapi-src/unified-memory-framework/.github/workflows/spellcheck.yml@main
Build:
needs: [Spellcheck, FastBuild]
needs: [Spellcheck, FastBuild, CodeStyle]
uses: oneapi-src/unified-memory-framework/.github/workflows/basic.yml@main
Benchmark:
needs: [Build]
Expand Down