diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index c3a2965ea9c..97c8968091b 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -28,9 +28,21 @@ jobs: # Dynamic: # CMAKE_BUILD_SHARED_LIBS: 'ON' # PYTHON_STATIC_ARGS: + # CMAKE_CPACK_GENERATOR: + # SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples + # RUN_PREFIX: . $(SETUPVARS) -pyver 3.8 && + # Debian: + # CMAKE_BUILD_SHARED_LIBS: 'ON' + # PYTHON_STATIC_ARGS: + # CMAKE_CPACK_GENERATOR: 'DEB' + # SAMPLES_INSTALL_DIR: /usr/share/openvino-2022.3.0/samples + # RUN_PREFIX: LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$(INSTALL_DIR)/opencv/lib:$LD_LIBRARY_PATH Static: CMAKE_BUILD_SHARED_LIBS: 'OFF' PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin" + CMAKE_CPACK_GENERATOR: + SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples + RUN_PREFIX: . $(SETUPVARS) -pyver 3.8 && maxParallel: 2 # About 150% of total time @@ -161,6 +173,7 @@ jobs: -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCPACK_GENERATOR=$(CMAKE_CPACK_GENERATOR) -S $(REPO_DIR) -B $(BUILD_DIR) @@ -175,8 +188,7 @@ jobs: export CCACHE_TEMPDIR=$(TMP_DIR)/ccache export CCACHE_BASEDIR=$(Pipeline.Workspace) export CCACHE_MAXSIZE=50G - ninja - workingDirectory: $(BUILD_DIR) + ninja -C $(BUILD_DIR) displayName: 'Build Lin' - script: ccache --show-stats @@ -185,9 +197,6 @@ jobs: - script: ls -alR $(REPO_DIR)/bin/ displayName: 'List bin files' - - script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake - displayName: 'Install' - - task: CMake@1 inputs: cmakeArgs: > @@ -195,18 +204,22 @@ jobs: -S $(REPO_DIR)/tests/layer_tests -B $(BUILD_LAYER_TESTS_DIR) - - script: ninja - workingDirectory: $(BUILD_LAYER_TESTS_DIR) + - script: ninja -C $(BUILD_LAYER_TESTS_DIR) displayName: 'Build Layer Tests' + - script: sudo apt-get remove libtbb2 -y + displayName: 'Remove debian dependencies' + condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB') + continueOnError: false + + - script: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake + displayName: 'Install wheel packages' + - script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_LAYER_TESTS_DIR)/cmake_install.cmake displayName: 'Install Layer Tests' - - script: ls -alR $(INSTALL_DIR) - displayName: 'List install files' - - script: python3 -m pip install openvino-dev --find-links=$(INSTALL_DIR)/tools - displayName: 'Install wheels' + displayName: 'Install python wheels' - script: | set -e @@ -216,32 +229,18 @@ jobs: displayName: 'Install tests' - script: ls -alR $(INSTALL_DIR) - displayName: 'List install files' - - - script: $(INSTALL_DIR)/samples/cpp/build_samples.sh -i $(INSTALL_DIR) - displayName: 'Build cpp samples' - continueOnError: false - - - script: | - export CC=clang - export CXX=clang++ - $(INSTALL_DIR)/samples/cpp/build_samples.sh -i $(INSTALL_DIR) - displayName: 'Build cpp samples - clang' - continueOnError: false - - - script: $(INSTALL_DIR)/samples/c/build_samples.sh -i $(INSTALL_DIR) - displayName: 'Build c samples' - continueOnError: false - - - script: rm -fr $(BUILD_DIR) - displayName: 'Clean build dir' - continueOnError: false + displayName: 'List install test files' # Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time - script: | export DATA_PATH=$(MODELS_PATH) export MODELS_PATH=$(MODELS_PATH) - . $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_TEST_DIR)/pyngraph $(PYTHON_STATIC_ARGS) --junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_zoo_models.py --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_backend.py + # because of static build libgna is needed for python binary + export LD_LIBRARY_PATH=$(REPO_DIR)/temp/gna_03.00.00.1455.2/linux/x64:$LD_LIBRARY_PATH + python3 -m pytest -s $(INSTALL_TEST_DIR)/pyngraph $(PYTHON_STATIC_ARGS) \ + --junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \ + --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_zoo_models.py \ + --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_backend.py displayName: 'nGraph and IE Python Bindings Tests' continueOnError: false @@ -249,81 +248,146 @@ jobs: - script: | export DATA_PATH=$(MODELS_PATH) export MODELS_PATH=$(MODELS_PATH) - export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR) - . $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_TEST_DIR)/pyopenvino $(PYTHON_STATIC_ARGS) --junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_utils/test_utils.py --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_zoo_models.py --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_backend.py -v + # because of static build libgna is needed for python binary + export LD_LIBRARY_PATH=$(REPO_DIR)/temp/gna_03.00.00.1455.2/linux/x64:$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH + python3 -m pytest -s $(INSTALL_TEST_DIR)/pyopenvino $(PYTHON_STATIC_ARGS) \ + --junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \ + --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_utils/test_utils.py \ + --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_zoo_models.py \ + --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_backend.py -v displayName: 'Python API 2.0 Tests' continueOnError: false - script: | - export MO_ROOT=$(INSTALL_DIR)/tools/mo - . $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_DIR)/tests/mo/unit_tests --junitxml=$(INSTALL_TEST_DIR)/TEST-ModelOptimizer.xml + # because of static build libgna is needed for python binary + export LD_LIBRARY_PATH=$(REPO_DIR)/temp/gna_03.00.00.1455.2/linux/x64:$LD_LIBRARY_PATH + python3 -m pytest -s $(INSTALL_TEST_DIR)/mo/unit_tests --junitxml=$(INSTALL_TEST_DIR)/TEST-ModelOptimizer.xml displayName: 'Model Optimizer UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-NGraphUT.xml + - script: | + sudo apt-get install libtbb-dev libpugixml-dev -y + cmake --build $(BUILD_DIR) --target package -j8 + condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB') + displayName: 'Build Debian packages' + continueOnError: false + + - script: | + # install debian packages from previous release + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-get install --no-install-recommends gnupg -y + echo "deb https://apt.repos.intel.com/openvino/2022 focal main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2022.list + sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/intel-openvino-2022.list + # sudo apt-get install openvino -y + # install our local one and make sure the conflicts are resolved + sudo apt-get install --no-install-recommends dpkg-dev -y + rm -r _CPack_Packages + dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz + echo "deb [trusted=yes] file:$(BUILD_DIR) ./" | sudo tee /etc/apt/sources.list.d/openvino-local.list + sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/openvino-local.list + sudo apt-get install openvino -y + workingDirectory: $(BUILD_DIR) + condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB') + displayName: 'Install Debian packages' + continueOnError: false + + - script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake + condition: ne(variables['CMAKE_CPACK_GENERATOR'], 'DEB') + displayName: 'Install openvino' + continueOnError: false + + - script: ls -alR $(INSTALL_DIR) + condition: ne(variables['CMAKE_CPACK_GENERATOR'], 'DEB') + displayName: 'List install files' + + - script: rm -fr $(BUILD_DIR) + displayName: 'Clean build dir' + continueOnError: false + + - script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR) + displayName: 'Build cpp samples' + continueOnError: false + + - script: | + export CC=clang + export CXX=clang++ + $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR) + displayName: 'Build cpp samples - clang' + continueOnError: false + + - script: $(SAMPLES_INSTALL_DIR)/c/build_samples.sh -i $(INSTALL_DIR) + displayName: 'Build c samples' + continueOnError: false + + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-NGraphUT.xml displayName: 'OV Core UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/onnx_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXImportUT.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/onnx_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXImportUT.xml displayName: 'ONNX Frontend UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml displayName: 'Paddle Frontend UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/onnx_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/onnx_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml displayName: 'ONNX Frontend UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/tensorflow_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml + - script: | + # tensorflow frontend is not distributed to end users, we have to find it manually + export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR) + $(RUN_PREFIX) $(INSTALL_TEST_DIR)/tensorflow_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml displayName: 'Tensorflow Frontend UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineUnitTests.xml + # python3 $(WORK_DIR)/gtest-parallel/gtest_parallel.py $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --workers=16 --dump_json_test_results=InferenceEngineUnitTests.json --gtest_filter=*smoke* -- --gtest_print_time=1 + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineUnitTests.xml displayName: 'IE UT old' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieUnitTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieUnitTests.xml displayName: 'IE UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-cpuUnitTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/cpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-cpuUnitTests.xml displayName: 'CPU UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/gnaUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-gnaUnitTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/gnaUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-gnaUnitTests.xml displayName: 'GNA UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-vpuUnitTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-vpuUnitTests.xml displayName: 'VPU UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/XLinkTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-XLinkTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/XLinkTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-XLinkTests.xml displayName: 'XLink Tests' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieMultiPluginUnitTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieMultiPluginUnitTests.xml displayName: 'MULTI UT' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/onnxImporterUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-onnxImporterUnitTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/onnxImporterUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-onnxImporterUnitTests.xml displayName: 'ONNX Importer UT' continueOnError: false - script: | # because of IR reader v7 export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR) - . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieFuncTests.xml + $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieFuncTests.xml displayName: 'IE FuncTests' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_template_func_tests --gtest_filter=*smoke* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-templateFuncTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_template_func_tests --gtest_filter=*smoke* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-templateFuncTests.xml displayName: 'TEMPLATE FuncTests' continueOnError: false - - script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-cpuFuncTests.xml + - script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-cpuFuncTests.xml displayName: 'CPU FuncTests' continueOnError: false condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF') @@ -331,14 +395,14 @@ jobs: - script: | export DATA_PATH=$(MODELS_PATH) export MODELS_PATH=$(MODELS_PATH) - . $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineCAPITests.xml + $(RUN_PREFIX) $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineCAPITests.xml displayName: 'IE CAPITests' continueOnError: false - script: | export DATA_PATH=$(MODELS_PATH) export MODELS_PATH=$(MODELS_PATH) - . $(SETUPVARS) && $(INSTALL_TEST_DIR)/OpenVinoCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OpenVinoCAPITests.xml + $(RUN_PREFIX) $(INSTALL_TEST_DIR)/OpenVinoCAPITests --gtest_filter=-*ov_core_read_model_from_memory* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OpenVinoCAPITests.xml displayName: 'OV CAPITests' continueOnError: false @@ -352,8 +416,7 @@ jobs: - script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_SAMPLES_TESTS_DIR)/cmake_install.cmake displayName: 'Install Samples Tests' - - script: | - python3 -m pip install -r $(INSTALL_DIR)/tests/smoke_tests/requirements.txt + - script: python3 -m pip install -r $(INSTALL_TEST_DIR)/smoke_tests/requirements.txt displayName: 'Install dependencies for samples smoke tests' continueOnError: false @@ -361,19 +424,17 @@ jobs: export PATH=$HOME/.local/bin:$PATH export IE_APP_PATH=$(INSTALL_DIR)/samples_bin export LD_LIBRARY_PATH=$IE_APP_PATH:$LD_LIBRARY_PATH - export IE_APP_PYTHON_PATH=$(INSTALL_DIR)/samples/python/ - export SHARE=$(INSTALL_DIR)/tests/smoke_tests/samples_smoke_tests_data/ + export IE_APP_PYTHON_PATH=$(SAMPLES_INSTALL_DIR)/python/ + export SHARE=$(INSTALL_TEST_DIR)/smoke_tests/samples_smoke_tests_data/ export WORKSPACE=$(INSTALL_DIR) - . $(SETUPVARS) && python3 -m pytest $(INSTALL_DIR)/tests/smoke_tests/ --env_conf $(INSTALL_DIR)/tests/smoke_tests/env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml + $(RUN_PREFIX) python3 -m pytest $(INSTALL_TEST_DIR)/smoke_tests/ --env_conf $(INSTALL_TEST_DIR)/smoke_tests/env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml displayName: 'Samples Smoke Tests' continueOnError: false - script: | - . $(SETUPVARS) python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt - export MO_ROOT=$(INSTALL_DIR)/tools/mo export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH - python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_Roll.xmlTEST + $(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_Roll.xmlTEST displayName: 'Layer Tests' continueOnError: false diff --git a/.ci/azure/linux_debian.yml b/.ci/azure/linux_debian.yml new file mode 100644 index 00000000000..613fdc91c27 --- /dev/null +++ b/.ci/azure/linux_debian.yml @@ -0,0 +1,416 @@ +trigger: + branches: + include: + - master + - releases/* + paths: + exclude: + - docs/* + +resources: + repositories: + - repository: openvino_contrib + type: github + endpoint: openvinotoolkit + name: openvinotoolkit/openvino_contrib + ref: master + + - repository: testdata + type: github + endpoint: openvinotoolkit + name: openvinotoolkit/testdata + ref: master + +jobs: +- job: Lin-Debian + # About 150% of total time + timeoutInMinutes: 120 + + pool: + name: LIN_VMSS_VENV_F16S_U20_WU2 + + variables: + system.debug: true + VSTS_HTTP_RETRY: 5 + VSTS_HTTP_TIMEOUT: 200 + BUILD_TYPE: Release + REPO_DIR: $(Build.Repository.LocalPath) + OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)/../openvino_contrib + MODELS_PATH: $(REPO_DIR)/../testdata + WORK_DIR: $(Pipeline.Workspace)/_w + BUILD_DIR: $(WORK_DIR)/build + BUILD_SAMPLES_DIR: $(WORK_DIR)/build_samples + BUILD_LAYER_TESTS_DIR: $(WORK_DIR)/build_layer_tests + BUILD_SAMPLES_TESTS_DIR: $(WORK_DIR)/build_samples_tests + INSTALL_DIR: $(WORK_DIR)/install_pkg + INSTALL_TEST_DIR: $(INSTALL_DIR)/tests + LAYER_TESTS_DIR: $(INSTALL_TEST_DIR)/layer_tests + SAMPLES_INSTALL_DIR: /usr/share/openvino-2022.3.0/samples + TMP_DIR: /mnt/tmp + SHARE_DIR: /mount/cinfsshare/onnxtestdata + CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux + + steps: + - script: | + curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01" + whoami + uname -a + echo Python3 info ; which python3 ; python3 --version + echo Python info ; which python ; python --version + echo Java info ; which java ; java -version + echo gcc info ; which gcc ; gcc --version + echo cmake info ; which cmake ; cmake --version + lsb_release + env + cat /proc/cpuinfo + cat /proc/meminfo + cat /etc/fstab + vmstat -s + df + lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd" + free -h + echo TargetBranch: $(System.PullRequest.TargetBranch) + echo SourceBranch: $(Build.SourceBranch) + displayName: 'System info' + + - script: | + set -e + rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR) + rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR) + rm -rf $(BUILD_SAMPLES_DIR) ; mkdir $(BUILD_SAMPLES_DIR) + sudo rm -rf $(TMP_DIR) ; sudo mkdir $(TMP_DIR) ; sudo chmod 777 -R $(TMP_DIR) + sudo mkdir -p $(SHARE_DIR) + sudo apt --assume-yes update && sudo apt --assume-yes install nfs-common + sudo mount -vvv -t nfs cinfsshare.file.core.windows.net:/cinfsshare/onnxtestdata $(SHARE_DIR) -o vers=4,minorversion=1,sec=sys + mkdir -p $(CCACHE_DIR) + displayName: 'Make dir' + + - checkout: self + clean: true + lfs: false + submodules: recursive + path: openvino + + - checkout: openvino_contrib + clean: true + lfs: false + submodules: recursive + path: openvino_contrib + + - script: | + set -e + $(REPO_DIR)/install_build_dependencies.sh + # Move jdk into contrib + # 'clang' compiler is to check that samples can be built using it + sudo apt --assume-yes install openjdk-11-jdk clang + sudo apt --assume-yes install --no-install-recommends libopencv-imgproc-dev libopencv-imgcodecs-dev + # For opencv-python: python3-setuptools and pip upgrade + python3 -m pip install --upgrade pip + python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements.txt + python3 -m pip install -r $(REPO_DIR)/src/bindings/python/wheel/requirements-dev.txt + # For running Python API tests + python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements-dev.txt + # For running Paddle frontend unit tests + python3 -m pip install -r $(REPO_DIR)/src/core/tests/frontend/paddle/requirements_dev.txt + # For running ONNX frontend unit tests + python3 -m pip install -r $(REPO_DIR)/src/core/tests/requirements_test_onnx.txt + # For MO unit tests + python3 -m pip install -r $(REPO_DIR)/tools/mo/requirements.txt + python3 -m pip install -r $(REPO_DIR)/tools/mo/requirements_dev.txt + # Speed up build + wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip + unzip ninja-linux.zip + sudo cp -v ninja /usr/local/bin/ + # Speed up tests + git clone https://github.com/google/gtest-parallel.git + workingDirectory: $(WORK_DIR) + displayName: 'Install dependencies' + + # Should be after 'Install dependencies' because Git lfs is not installed + - checkout: testdata + clean: true + lfs: true + path: testdata + + - task: CMake@1 + inputs: + # CMake must get Python 3.x version by default + cmakeArgs: > + -GNinja + -DVERBOSE_BUILD=ON + -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) + -DENABLE_PYTHON=ON + -DPYTHON_EXECUTABLE=/usr/bin/python3.8 + -DENABLE_WHEEL=ON + -DENABLE_TESTS=ON + -DENABLE_FASTER_BUILD=ON + -DENABLE_STRICT_DEPENDENCIES=OFF + -DENABLE_REQUIREMENTS_INSTALL=OFF + -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + -DCMAKE_C_COMPILER_LAUNCHER=ccache + -DCPACK_GENERATOR=DEB + -S $(REPO_DIR) + -B $(BUILD_DIR) + + - script: ls -alR $(REPO_DIR)/temp/ + displayName: 'List temp SDKs' + + - script: ccache --zero-stats --max-size=50G --show-config + displayName: 'Clean ccache stats' + + - script: | + export CCACHE_DIR=$(CCACHE_DIR) + export CCACHE_TEMPDIR=$(TMP_DIR)/ccache + export CCACHE_BASEDIR=$(Pipeline.Workspace) + export CCACHE_MAXSIZE=50G + ninja -C $(BUILD_DIR) + displayName: 'Build Lin' + + - script: ccache --show-stats + displayName: 'Show ccache stats' + + - script: ls -alR $(REPO_DIR)/bin/ + displayName: 'List bin files' + + - task: CMake@1 + inputs: + cmakeArgs: > + -GNinja + -S $(REPO_DIR)/tests/layer_tests + -B $(BUILD_LAYER_TESTS_DIR) + + - script: ninja -C $(BUILD_LAYER_TESTS_DIR) + displayName: 'Build Layer Tests' + + - script: sudo apt-get remove libtbb2 -y + displayName: 'Remove debian dependencies' + continueOnError: false + + - script: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake + displayName: 'Install wheel packages' + + - script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_LAYER_TESTS_DIR)/cmake_install.cmake + displayName: 'Install Layer Tests' + + - script: python3 -m pip install openvino-dev --find-links=$(INSTALL_DIR)/tools + displayName: 'Install python wheels' + + - script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P $(BUILD_DIR)/cmake_install.cmake + displayName: 'Install tests' + + - script: ls -alR $(INSTALL_DIR) + displayName: 'List install test files' + + # Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time + - script: | + export DATA_PATH=$(MODELS_PATH) + export MODELS_PATH=$(MODELS_PATH) + python3 -m pytest -s $(INSTALL_TEST_DIR)/pyngraph \ + --junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \ + --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_zoo_models.py \ + --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_backend.py + displayName: 'nGraph and IE Python Bindings Tests' + continueOnError: true + + # Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time + - script: | + export DATA_PATH=$(MODELS_PATH) + export MODELS_PATH=$(MODELS_PATH) + python3 -m pytest -s $(INSTALL_TEST_DIR)/pyopenvino \ + --junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \ + --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_utils/test_utils.py \ + --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_zoo_models.py \ + --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_backend.py -v + displayName: 'Python API 2.0 Tests' + continueOnError: true + + - script: python3 -m pytest -s $(INSTALL_TEST_DIR)/mo/unit_tests --junitxml=$(INSTALL_TEST_DIR)/TEST-ModelOptimizer.xml + displayName: 'Model Optimizer UT' + continueOnError: true + + - script: | + sudo apt-get install libtbb-dev libpugixml-dev -y + cmake --build $(BUILD_DIR) --target package -j8 + condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB') + displayName: 'Build Debian packages' + continueOnError: true + + - script: | + # install debian packages from previous release + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-get install --no-install-recommends gnupg -y + echo "deb https://apt.repos.intel.com/openvino/2022 focal main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2022.list + sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/intel-openvino-2022.list + # sudo apt-get install openvino -y + # install our local one and make sure the conflicts are resolved + sudo apt-get install --no-install-recommends dpkg-dev -y + rm -r _CPack_Packages + dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz + echo "deb [trusted=yes] file:$(BUILD_DIR) ./" | sudo tee /etc/apt/sources.list.d/openvino-local.list + sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/openvino-local.list + sudo apt-get install openvino -y + workingDirectory: $(BUILD_DIR) + displayName: 'Install Debian packages' + continueOnError: true + + - script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake + displayName: 'Install openvino' + continueOnError: true + + - script: ls -alR $(INSTALL_DIR) + displayName: 'List install files' + + - script: rm -fr $(BUILD_DIR) + displayName: 'Clean build dir' + continueOnError: true + + - script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR) + displayName: 'Build cpp samples' + continueOnError: true + + - script: | + export CC=clang + export CXX=clang++ + $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR) + displayName: 'Build cpp samples - clang' + continueOnError: true + + - script: $(SAMPLES_INSTALL_DIR)/c/build_samples.sh -i $(INSTALL_DIR) + displayName: 'Build c samples' + continueOnError: true + + - script: | + export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH + $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-NGraphUT.xml + displayName: 'OV Core UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/onnx_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXImportUT.xml + displayName: 'ONNX Frontend UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml + displayName: 'Paddle Frontend UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/onnx_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml + displayName: 'ONNX Frontend UT' + continueOnError: true + + - script: | + export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR) + $(INSTALL_TEST_DIR)/tensorflow_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml + displayName: 'Tensorflow Frontend UT' + continueOnError: true + + # python3 $(WORK_DIR)/gtest-parallel/gtest_parallel.py $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --workers=16 --dump_json_test_results=InferenceEngineUnitTests.json --gtest_filter=*smoke* -- --gtest_print_time=1 + - script: $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineUnitTests.xml + displayName: 'IE UT old' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieUnitTests.xml + displayName: 'IE UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/cpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-cpuUnitTests.xml + displayName: 'CPU UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/gnaUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-gnaUnitTests.xml + displayName: 'GNA UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-vpuUnitTests.xml + displayName: 'VPU UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/XLinkTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-XLinkTests.xml + displayName: 'XLink Tests' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieMultiPluginUnitTests.xml + displayName: 'MULTI UT' + continueOnError: true + + - script: $(INSTALL_TEST_DIR)/onnxImporterUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-onnxImporterUnitTests.xml + displayName: 'ONNX Importer UT' + continueOnError: true + + - script: | + # because of IR reader v7 + export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR) + $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieFuncTests.xml + displayName: 'IE FuncTests' + continueOnError: true + + - script: | + export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH + $(INSTALL_TEST_DIR)/ov_template_func_tests --gtest_filter=*smoke* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-templateFuncTests.xml + displayName: 'TEMPLATE FuncTests' + continueOnError: true + + # run not all smoke filter to save time in post-commit + - script: $(INSTALL_TEST_DIR)/cpuFuncTests --gtest_filter=*OVCLass*:*CoreThreadingTests* --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-cpuFuncTests.xml + displayName: 'CPU FuncTests' + continueOnError: true + + - script: | + export DATA_PATH=$(MODELS_PATH) + export MODELS_PATH=$(MODELS_PATH) + $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineCAPITests.xml + displayName: 'IE CAPITests' + continueOnError: true + + - script: | + export DATA_PATH=$(MODELS_PATH) + export MODELS_PATH=$(MODELS_PATH) + $(INSTALL_TEST_DIR)/OpenVinoCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-OpenVinoCAPITests.xml + displayName: 'OV CAPITests' + continueOnError: true + + - task: CMake@1 + inputs: + cmakeArgs: > + -GNinja + -S $(REPO_DIR)/tests/samples_tests + -B $(BUILD_SAMPLES_TESTS_DIR) + + - script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_SAMPLES_TESTS_DIR)/cmake_install.cmake + displayName: 'Install Samples Tests' + + - script: python3 -m pip install -r $(INSTALL_TEST_DIR)/smoke_tests/requirements.txt + displayName: 'Install dependencies for samples smoke tests' + continueOnError: true + + - script: | + export PATH=$HOME/.local/bin:$PATH + export IE_APP_PATH=$(INSTALL_DIR)/samples_bin + export LD_LIBRARY_PATH=$IE_APP_PATH:$LD_LIBRARY_PATH + export IE_APP_PYTHON_PATH=$(SAMPLES_INSTALL_DIR)/python/ + export SHARE=$(INSTALL_TEST_DIR)/smoke_tests/samples_smoke_tests_data/ + export WORKSPACE=$(INSTALL_DIR) + python3 -m pytest $(INSTALL_TEST_DIR)/smoke_tests/ --env_conf $(INSTALL_TEST_DIR)/smoke_tests/env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml + displayName: 'Samples Smoke Tests' + continueOnError: true + + - script: | + python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt + export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH + python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_Roll.xmlTEST + displayName: 'Layer Tests' + continueOnError: true + + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest + testResultsFiles: '**/TEST-*.xml' + #searchFolder: '$(BUILD_DIR)' + mergeTestResults: false # Optional + #failTaskOnFailedTests: false # Optional + #testRunTitle: 'Pre/Post-Commit' # Optional + buildPlatform: 'x64' # Optional + buildConfiguration: 'Linux' # Optional + #publishRunAttachments: true # Optional diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index 8d49a179725..c211de19ee8 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -135,8 +135,24 @@ jobs: - script: | set PATH=$(WORK_DIR)\ninja-win;%PATH% - call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) -G "Ninja Multi-Config" -DENABLE_WHEEL=ON -DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS) -DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS) -DENABLE_REQUIREMENTS_INSTALL=OFF -DENABLE_FASTER_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DENABLE_STRICT_DEPENDENCIES=OFF -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE="C:\hostedtoolcache\windows\Python\3.7.6\x64\python.exe" -DPYTHON_INCLUDE_DIR="C:\hostedtoolcache\windows\Python\3.7.6\x64\include" -DPYTHON_LIBRARY="C:\hostedtoolcache\windows\Python\3.7.6\x64\libs\python37.lib" -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR) - workingDirectory: $(BUILD_DIR) + call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) -G "Ninja Multi-Config" \ + -DENABLE_WHEEL=ON \ + -DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS) \ + -DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS) \ + -DENABLE_REQUIREMENTS_INSTALL=OFF \ + -DENABLE_FASTER_BUILD=ON \ + -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \ + -DENABLE_TESTS=ON + -DENABLE_STRICT_DEPENDENCIES=OFF \ + -DENABLE_PYTHON=ON \ + -DPYTHON_EXECUTABLE="C:\hostedtoolcache\windows\Python\3.7.6\x64\python.exe" \ + -DPYTHON_INCLUDE_DIR="C:\hostedtoolcache\windows\Python\3.7.6\x64\include" \ + -DPYTHON_LIBRARY="C:\hostedtoolcache\windows\Python\3.7.6\x64\libs\python37.lib" \ + -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules \ + -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" \ + -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" \ + -S $(REPO_DIR) \ + -B $(BUILD_DIR) displayName: 'CMake' - script: dir $(REPO_DIR)\temp\ /s @@ -159,8 +175,12 @@ jobs: - script: python -m pip install openvino-dev --find-links=$(INSTALL_DIR)\tools displayName: 'Install Wheels' - - script: call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)\tests\samples_tests - workingDirectory: $(BUILD_SAMPLES_TESTS_DIR) + - script: | + call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) \ + -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" \ + -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" \ + -S $(REPO_DIR)\tests\samples_tests \ + -B $(BUILD_SAMPLES_TESTS_DIR) displayName: 'CMake' - script: $(CMAKE_CMD) -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_SAMPLES_TESTS_DIR)\cmake_install.cmake diff --git a/cmake/developer_package/IEDevScriptsConfig.cmake b/cmake/developer_package/IEDevScriptsConfig.cmake index da5278c2b37..24e20c03a01 100644 --- a/cmake/developer_package/IEDevScriptsConfig.cmake +++ b/cmake/developer_package/IEDevScriptsConfig.cmake @@ -169,6 +169,11 @@ ov_set_if_not_defined(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FO ov_set_if_not_defined(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}) ov_set_if_not_defined(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND CPACK_GENERATOR STREQUAL "DEB") + # to make sure that lib/ is created on Debian + set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Cmake install prefix" FORCE) +endif() + if(APPLE) set(CMAKE_MACOSX_RPATH ON) # WA for Xcode generator + object libraries issue: diff --git a/cmake/developer_package/packaging/debian.cmake b/cmake/developer_package/packaging/debian.cmake index 40a3dbeeb0e..c04a65b1ed8 100644 --- a/cmake/developer_package/packaging/debian.cmake +++ b/cmake/developer_package/packaging/debian.cmake @@ -29,7 +29,8 @@ macro(ov_debian_cpack_set_dirs) set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR}) unset(OV_CPACK_SHAREDIR) - set(OV_CPACK_WHEELSDIR .) # TODO + # skipped during debian packaging + set(OV_CPACK_WHEELSDIR "tools") # for BW compatibility set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR}) @@ -50,7 +51,7 @@ macro(ov_override_component_names) set(OV_CPACK_COMP_CORE_C "${OV_CPACK_COMP_CORE}") set(OV_CPACK_COMP_CORE_C_DEV "${OV_CPACK_COMP_CORE_DEV}") # merge all pythons into a single component - set(OV_CPACK_COMP_PYTHON_OPENVINO "python") + set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino") set(OV_CPACK_COMP_PYTHON_IE_API "${OV_CPACK_COMP_PYTHON_OPENVINO}") set(OV_CPACK_COMP_PYTHON_NGRAPH "${OV_CPACK_COMP_PYTHON_OPENVINO}") # merge all C / C++ samples as a single samples component @@ -61,8 +62,6 @@ macro(ov_override_component_names) set(OV_CPACK_COMP_DEV_REQ_FILES "${OV_CPACK_COMP_CORE_DEV}") # move core_tools to core-dev set(OV_CPACK_COMP_CORE_TOOLS "${OV_CPACK_COMP_CORE_DEV}") - # move licensing to core - set(OV_CPACK_COMP_LICENSING "${OV_CPACK_COMP_CORE}") endmacro() ov_override_component_names() diff --git a/cmake/packaging/debian.cmake b/cmake/packaging/debian.cmake index 16c10985a70..45ff715534b 100644 --- a/cmake/packaging/debian.cmake +++ b/cmake/packaging/debian.cmake @@ -147,8 +147,12 @@ macro(ov_cpack_settings) endif() # intel-cpu - if(ENABLE_INTEL_CPU) - set(CPACK_COMPONENT_CPU_DESCRIPTION "IntelĀ® CPU") + if(ENABLE_INTEL_CPU OR DEFINED openvino_arm_cpu_plugin_SOURCE_DIR) + if(ENABLE_INTEL_CPU) + set(CPACK_COMPONENT_CPU_DESCRIPTION "IntelĀ® CPU") + else() + set(CPACK_COMPONENT_CPU_DESCRIPTION "ARM CPU") + endif() set(CPACK_COMPONENT_CPU_DEPENDS "core") set(CPACK_DEBIAN_CPU_PACKAGE_NAME "libopenvino-intel-cpu-${cpack_name_ver}") set(CPACK_DEBIAN_CPU_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}") @@ -203,14 +207,14 @@ macro(ov_cpack_settings) # if(ENABLE_PYTHON) - set(CPACK_COMPONENT_PYTHON_PYTHON3.8_DESCRIPTION "OpenVINO Python bindings") + set(CPACK_COMPONENT_PYOPENVINO_PYTHON3.8_DESCRIPTION "OpenVINO Python bindings") if(installed_plugins) - set(CPACK_COMPONENT_PYTHON_PYTHON3.8_DEPENDS "${installed_plugins}") + set(CPACK_COMPONENT_PYOPENVINO_PYTHON3.8_DEPENDS "${installed_plugins}") else() - set(CPACK_COMPONENT_PYTHON_PYTHON3.8_DEPENDS "core") + set(CPACK_COMPONENT_PYOPENVINO_PYTHON3.8_DEPENDS "core") endif() - set(CPACK_DEBIAN_PYTHON_PYTHON3.8_PACKAGE_NAME "libopenvino-python-${cpack_name_ver}") - set(CPACK_DEBIAN_PYTHON_PYTHON3.8_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}") + set(CPACK_DEBIAN_PYOPENVINO_PYTHON3.8_PACKAGE_NAME "libopenvino-python-${cpack_name_ver}") + set(CPACK_DEBIAN_PYOPENVINO_PYTHON3.8_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}") endif() # diff --git a/licensing/CMakeLists.txt b/licensing/CMakeLists.txt index f1c0129a4b5..48df2726802 100644 --- a/licensing/CMakeLists.txt +++ b/licensing/CMakeLists.txt @@ -8,8 +8,6 @@ ie_cpack_add_component(${OV_CPACK_COMP_LICENSING} HIDDEN) -# TODO: exclude from debian and use cmake/developer_package/packaging/copyright - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OV_CPACK_DOCDIR}/licensing COMPONENT ${OV_CPACK_COMP_LICENSING} diff --git a/src/bindings/python/tests_compatibility/test_utils/test_utils.py b/src/bindings/python/tests_compatibility/test_utils/test_utils.py index 32c6eddbeda..83194f59803 100644 --- a/src/bindings/python/tests_compatibility/test_utils/test_utils.py +++ b/src/bindings/python/tests_compatibility/test_utils/test_utils.py @@ -24,7 +24,7 @@ def test_compare_functions(): func = get_test_function() status, _ = compare_functions(func, func) assert status - except RuntimeError: + except ModuleNotFoundError: print("openvino.test_utils.compare_functions is not available") diff --git a/src/frontends/tensorflow/CMakeLists.txt b/src/frontends/tensorflow/CMakeLists.txt index 6026feb2c2a..8bd3ba49d00 100644 --- a/src/frontends/tensorflow/CMakeLists.txt +++ b/src/frontends/tensorflow/CMakeLists.txt @@ -9,20 +9,21 @@ ov_add_frontend(NAME tensorflow LINK_LIBRARIES openvino::util openvino::runtime::dev) # give a different name during installation to OpenVINO package -set_target_properties(openvino_tensorflow_frontend PROPERTIES OUTPUT_NAME openvino_tensorflow_fe) +set(target_name "${FRONTEND_NAME_PREFIX}tensorflow${FRONTEND_NAME_SUFFIX}") +set_target_properties(${target_name} PROPERTIES OUTPUT_NAME openvino_tensorflow_fe) function(ov_frontend_get_file_name target_name library_name) set(LIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") - set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}") + set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}${OpenVINO_VERSION_SUFFIX}") set("${library_name}" "${LIB_PREFIX}${target_name}${LIB_SUFFIX}" PARENT_SCOPE) endfunction() -ov_frontend_get_file_name(openvino_tensorflow_frontend output_name) +ov_frontend_get_file_name(${target_name} output_name) # install with original name for tests component -install(FILES $ - DESTINATION ${OV_CPACK_RUNTIMEDIR} +install(FILES $ + DESTINATION tests COMPONENT tests RENAME ${output_name} EXCLUDE_FROM_ALL) diff --git a/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp b/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp index 94e2aae3b99..861c9e18376 100644 --- a/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp +++ b/src/tests/functional/inference_engine/ir_serialization/custom_ops.cpp @@ -70,7 +70,7 @@ TEST_F(CustomOpsSerializationTest, CustomOpUser_MO) { // a shared library for ONNX don't make sence in static OpenVINO build #ifndef OPENVINO_STATIC_LIBRARY -TEST_F(CustomOpsSerializationTest, CustomOpUser_ONNXImporter) { +TEST_F(CustomOpsSerializationTest, DISABLED_CustomOpUser_ONNXImporter) { const std::string model = CommonTestUtils::getModelFromTestModelZoo(IR_SERIALIZATION_MODELS_PATH "custom_op.onnx"); InferenceEngine::Core ie;