Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into dependabot-approves
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed Jan 2, 2023
2 parents 8651cec + 5a4dbb6 commit 9d94db5
Show file tree
Hide file tree
Showing 43 changed files with 1,575 additions and 703 deletions.
45 changes: 23 additions & 22 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ concurrency:
jobs:
clang-format:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -34,33 +36,19 @@ jobs:
# Run cmake with -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT in order to enable codestyle check for ITT collector
- name: CMake configure
run: |
cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -B build
- name: Check code style
run: cmake --build build --target clang_format_check_all -j8
run: cmake -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -B build

- name: Create code style diff
if: failure()
run: |
cmake --build build --target clang_format_fix_all -j8
git diff > code_style_diff.diff
- name: Fix code style
run: cmake --build build --target clang_format_fix_all -j8

- name: suggester / clang-format
if: failure() && startsWith(github.event_name, 'pull_request')
uses: reviewdog/action-suggester@v1
- uses: stefanzweifel/git-auto-commit-action@v4
with:
level: error
tool_name: clang-format

- uses: actions/upload-artifact@v3
if: failure()
with:
name: code_style_diff
path: code_style_diff.diff
commit_message: "[github actions] Apply clang-format code style fixes"

ShellCheck:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -74,9 +62,22 @@ jobs:
- name: CMake configure
run: cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -B build

- name: ShellCheck
- name: Shellcheck cmake target
run: cmake --build build --target ie_shellcheck -j8

# always provide suggestions even for skipped scripts in ie_shellcheck tagret
- name: ShellCheck action
if: always()
uses: reviewdog/action-shellcheck@v1
with:
level: style
reporter: github-pr-review
check_all_files_with_shebangs: true
fail_on_error: true
exclude: |
"*/thirdparty/*"
"./temp/*"
NamingConventionCheck:
runs-on: ubuntu-22.04
steps:
Expand Down
6 changes: 3 additions & 3 deletions cmake/developer_package/compile_flags/sanitizer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ if (DEFINED SANITIZER_COMPILER_FLAGS)
# prevent unloading libraries at runtime, so sanitizer can resolve their symbols
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -Wl,-z,nodelete")
if(OV_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -fuse-ld=lld")
endif()
endif()

if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0 OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(SANITIZER_LINKER_FLAGS "${SANITIZER_LINKER_FLAGS} -fuse-ld=lld")
endif()
else()
set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} /Oy-")
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/packaging/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ macro(ov_cpack_settings)
# 2022 release series
# - 2022.1.0 is the last public release with debian packages from Intel install team
# - 2022.1.1, 2022.2 do not have debian packages enabled, distributed only as archives
# - 2022.3 is the first release where RPM updated packages are introduced
2022.1.0)
# - 2022.3 is the first release where Debian updated packages are introduced
2022.3.0)

#
# core: base dependency for each component
Expand Down
2 changes: 1 addition & 1 deletion cmake/packaging/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ macro(ov_cpack_settings)
# - 2022.1.0 is the last public release with rpm packages from Intel install team
# - 2022.1.1, 2022.2 do not have rpm packages enabled, distributed only as archives
# - 2022.3 is the first release where RPM updated packages are introduced
# 2022.1.0
2022.3.0
)

find_host_program(rpmlint_PROGRAM NAMES rpmlint DOC "Path to rpmlint")
Expand Down
5 changes: 1 addition & 4 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ set(shellcheck_skip_list
"${OpenVINO_SOURCE_DIR}/src/plugins/intel_cpu/thirdparty"
"${OpenVINO_SOURCE_DIR}/src/plugins/intel_gpu/thirdparty"
"${OpenVINO_SOURCE_DIR}/src/bindings/python/thirdparty/pybind11"
"${OpenVINO_SOURCE_DIR}/tools/pot/thirdparty"
"${TEMP}")

# TODO fix and enable back
list(APPEND shellcheck_skip_list
"${OpenVINO_SOURCE_DIR}/scripts/install_dependencies/install_NEO_OCL_driver.sh"
"${OpenVINO_SOURCE_DIR}/scripts/install_dependencies/install_openvino_dependencies.sh"
"${OpenVINO_SOURCE_DIR}/src/bindings/python/tests/test_onnx/model_zoo_preprocess.sh"
"${OpenVINO_SOURCE_DIR}/src/bindings/python/tests_compatibility/test_onnx/model_zoo_preprocess.sh")
"${OpenVINO_SOURCE_DIR}/scripts/install_dependencies/install_openvino_dependencies.sh")

if(shellcheck_VERSION VERSION_GREATER_EQUAL 0.7.0)
list(APPEND shellcheck_skip_list
Expand Down
Loading

0 comments on commit 9d94db5

Please sign in to comment.