Files
openvino/.github/workflows/code_style.yml
Anastasia Kuporosova a8b59458d1 [Python API] Move old python bindings (#9134)
* [Python API] Remove offline transformations from old python api

* [Python API] Move wheel folder to the python dir

* codestyle files

* [Python API] Move old python bindings

* move api

* one more codestyle

* fix install stage

* remove unexisting file from gitignore

* flake8 style

* try to fix jenkins

* undo comments

* return variable

* remove cpack

* fix after merge

* try to fix version

* fix test

* remove debug info

* version of python

* try to fix pyversion

* update tests

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2022-01-24 13:16:07 +03:00

99 lines
2.8 KiB
YAML

name: Code Style
on: [push, pull_request]
jobs:
clang-format:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install clang-format-9
run: |
sudo apt update
sudo apt --assume-yes install clang-format-9
- name: Install dependencies
run: |
sudo apt update
sudo apt --assume-yes install libusb-1.0-0-dev
python3 -m pip install --upgrade pip
python3 -m pip install -r ./src/bindings/python/src/compatibility/openvino/requirements.txt
# Add for -DENABLE_PYTHON=ON, no cython
python3 -m pip install -r ./src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# Run cmake with -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT in order to enable codestyle check for ITT collector
- name: CMake
run: |
mkdir build
cd build
cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT ..
- name: Check code style
run: cmake --build . --target clang_format_check_all -j8
working-directory: build
- name: Create code style diff
if: failure()
run: |
cmake --build . --target clang_format_fix_all -j8
git diff > code_style_diff.diff
working-directory: build
- uses: actions/upload-artifact@v2
if: failure()
with:
name: code_style_diff
path: build/code_style_diff.diff
ShellCheck:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install ShellCheck
run: |
sudo apt update
sudo apt --assume-yes install shellcheck
- name: Install dependencies
run: python3 -m pip install -r ./src/bindings/python/src/compatibility/openvino/requirements.txt
- name: CMake
run: |
mkdir build
cd build
cmake -DENABLE_INTEL_VPU=OFF ..
- name: ShellCheck
run: cmake --build . --target ie_shellcheck -j8
working-directory: build
NamingConventionCheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Clang dependency
run: |
sudo apt update
sudo apt --assume-yes install libclang-11-dev
- name: Install Python-based dependencies
run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt
- name: CMake
run: |
mkdir build
cd build
cmake -DENABLE_INTEL_VPU=OFF ..
- name: Naming convention check
run: cmake --build . --target ncc_all -j8
working-directory: build