Actions CI: Enable nGraph Code style check (#863)

This commit is contained in:
Alexander Zhogov 2020-06-10 16:18:53 +03:00 committed by GitHub
parent 84119afe9a
commit 4778feae91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

34
.github/workflows/code_style.yml vendored Normal file
View 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