Actions CI: Enable nGraph Code style check (#863)
This commit is contained in:
parent
84119afe9a
commit
4778feae91
34
.github/workflows/code_style.yml
vendored
Normal file
34
.github/workflows/code_style.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Code Style
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nGraph:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install clang-format-3.9
|
||||||
|
run: sudo apt --assume-yes install clang-format-3.9
|
||||||
|
|
||||||
|
- name: CMake
|
||||||
|
run: |
|
||||||
|
mkdir ngraph-build
|
||||||
|
cd ngraph-build
|
||||||
|
cmake ../ngraph
|
||||||
|
|
||||||
|
- name: Check
|
||||||
|
run: |
|
||||||
|
make style-check
|
||||||
|
working-directory: ngraph-build
|
||||||
|
|
||||||
|
- name: apply-code-format
|
||||||
|
if: ${{ failure() }}
|
||||||
|
run: |
|
||||||
|
ngraph/maint/apply-code-format.sh
|
||||||
|
git diff >code_style_diff.patch
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
name: code_style_diff
|
||||||
|
path: code_style_diff.patch
|
Loading…
Reference in New Issue
Block a user