summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kalinich (GitHub) <AKalinich@luxoft.com>2021-10-15 14:24:10 -0400
committerGitHub <noreply@github.com>2021-10-15 14:24:10 -0400
commita0bde744aceaf3c989dccf6bf5c7de04c363a675 (patch)
tree793a657ff4034f6e6f03fdb370865bfd65123009
parent43b9863109763d703ad90ab318681a08d98dd345 (diff)
downloadsdl_core-a0bde744aceaf3c989dccf6bf5c7de04c363a675.tar.gz
Added python packages' check (#3776)
Co-authored-by: OlhaVorobiova <olha.vorobiova@dxc.com>
-rw-r--r--.github/workflows/sdl_core_github_ci.yml4
-rw-r--r--.github/workflows/sdl_core_github_ci_coverity.yml4
-rw-r--r--src/components/interfaces/CMakeLists.txt15
3 files changed, 17 insertions, 6 deletions
diff --git a/.github/workflows/sdl_core_github_ci.yml b/.github/workflows/sdl_core_github_ci.yml
index 14ff51c2fe..47e13f9673 100644
--- a/.github/workflows/sdl_core_github_ci.yml
+++ b/.github/workflows/sdl_core_github_ci.yml
@@ -9,7 +9,7 @@ jobs:
run: git -C ${{ github.workspace }} submodule update --init --recursive
# Install Dependencies
- name: Apt Get Dependencies
- run: sudo apt-get update && sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck python3-pip python3-setuptools && sudo apt-get install -f clang-format-8
+ run: sudo apt-get update && sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck python3-pip python3-setuptools python3-wheel && sudo apt-get install -f clang-format-8
- name: Setup CMAKE
uses: jwlawson/actions-setup-cmake@v1.8
with:
@@ -36,7 +36,7 @@ jobs:
- name: Configure
run: cmake ../sdl_core -DBUILD_TESTS=ON -DLOGGER_NAME=BOOST
- name: Build
- run: make install-3rd_party && make -j `nproc` install
+ run: make install-3rd_party && make install_python_dependencies && make -j `nproc` install
- name: Set Library Path
run: echo "LD_LIBRARY_PATH=$THIRD_PARTY_INSTALL_PREFIX/lib:." >> $GITHUB_ENV
# run tests
diff --git a/.github/workflows/sdl_core_github_ci_coverity.yml b/.github/workflows/sdl_core_github_ci_coverity.yml
index c60482d30f..84769c26ea 100644
--- a/.github/workflows/sdl_core_github_ci_coverity.yml
+++ b/.github/workflows/sdl_core_github_ci_coverity.yml
@@ -21,7 +21,7 @@ jobs:
run: git -C ${{ github.workspace }} submodule update --init --recursive
# Install Dependencies
- name: Apt Get Dependencies
- run: sudo apt-get update && sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck python3-pip python3-setuptools && sudo apt-get install -f clang-format-6.0
+ run: sudo apt-get update && sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck python3-pip python3-setuptools python3-wheel && sudo apt-get install -f clang-format-6.0
- name: Setup CMAKE
uses: jwlawson/actions-setup-cmake@v1.8
with:
@@ -51,7 +51,7 @@ jobs:
- name: unzip
run: tar zxvf coverity_tool.tgz
- name: Build
- run: make install-3rd_party && ./cov-analysis-linux64-2020.09/bin/cov-build --dir cov-int make -j `nproc` install
+ run: make install-3rd_party && make install_python_dependencies && ./cov-analysis-linux64-2020.09/bin/cov-build --dir cov-int make -j `nproc` install
- name: Set Library Path
run: echo "LD_LIBRARY_PATH=$THIRD_PARTY_INSTALL_PREFIX/lib:." >> $GITHUB_ENV
- name: Compress Coverity
diff --git a/src/components/interfaces/CMakeLists.txt b/src/components/interfaces/CMakeLists.txt
index 7f1a65277d..9679ccf0b4 100644
--- a/src/components/interfaces/CMakeLists.txt
+++ b/src/components/interfaces/CMakeLists.txt
@@ -52,9 +52,20 @@ include_directories (
${CMAKE_BINARY_DIR}
)
-execute_process(COMMAND /usr/bin/env python3 -m pip install --upgrade --user pip setuptools wheel)
set(GENERATOR_REQUIREMENTS "${CMAKE_SOURCE_DIR}/tools/InterfaceGenerator/requirements.txt")
-execute_process(COMMAND /usr/bin/env python3 -m pip install --user --requirement ${GENERATOR_REQUIREMENTS})
+file(STRINGS ${GENERATOR_REQUIREMENTS} REQUIREMENTS_LIST)
+execute_process(COMMAND /usr/bin/env python3 -m pip list --user OUTPUT_VARIABLE PYTHON_PACKAGES_LIST)
+
+foreach(REQUIREMENT_PACKAGE IN LISTS REQUIREMENTS_LIST)
+ string(FIND "${PYTHON_PACKAGES_LIST}" "${REQUIREMENT_PACKAGE}" PACKAGE_FOUND)
+ if (PACKAGE_FOUND EQUAL -1)
+ message(WARNING "${REQUIREMENT_PACKAGE} not found!")
+ endif()
+endforeach()
+
+add_custom_target(install_python_dependencies
+ COMMAND /usr/bin/env python3 -m pip install --user --requirement ${GENERATOR_REQUIREMENTS}
+)
generate_interface("v4_protocol_v1_2_no_extra.xml" "ns_smart_device_link_rpc::V1" "sdlrpcv1")
add_library(v4_protocol_v1_2_no_extra ${CMAKE_CURRENT_BINARY_DIR}/v4_protocol_v1_2_no_extra_schema.cc)