313 lines
11 KiB
YAML
313 lines
11 KiB
YAML
trigger:
|
|
branches:
|
|
include:
|
|
- master
|
|
- releases/*
|
|
paths:
|
|
exclude:
|
|
- docs/*
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: openvino_contrib
|
|
type: github
|
|
endpoint: openvinotoolkit
|
|
name: openvinotoolkit/openvino_contrib
|
|
|
|
- repository: testdata
|
|
type: github
|
|
endpoint: openvinotoolkit
|
|
name: openvinotoolkit/testdata
|
|
|
|
jobs:
|
|
- job: Lin
|
|
strategy:
|
|
matrix:
|
|
Dynamic:
|
|
CMAKE_BUILD_SHARED_LIBS: 'ON'
|
|
PYTHON_STATIC_ARGS:
|
|
Static:
|
|
CMAKE_BUILD_SHARED_LIBS: 'OFF'
|
|
PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin"
|
|
maxParallel: 2
|
|
|
|
# About 150% of total time
|
|
timeoutInMinutes: 90
|
|
|
|
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
|
|
INSTALL_DIR: $(WORK_DIR)/install_pkg
|
|
INSTALL_TEST_DIR: $(INSTALL_DIR)/tests
|
|
LAYER_TESTS_DIR: $(INSTALL_TEST_DIR)/layer_tests
|
|
SETUPVARS: $(INSTALL_DIR)/setupvars.sh
|
|
|
|
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
|
|
displayName: 'System info'
|
|
|
|
- script: |
|
|
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
|
|
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
|
|
rm -rf $(BUILD_SAMPLES_DIR) ; mkdir $(BUILD_SAMPLES_DIR)
|
|
echo TargetBranch: $(System.PullRequest.TargetBranch)
|
|
echo SourceBranch: $(Build.SourceBranch)
|
|
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
|
|
sudo apt --assume-yes install openjdk-11-jdk
|
|
# For opencv-python: python3-setuptools and pip upgrade
|
|
python3 -m pip install --upgrade pip
|
|
python3 -m pip install -r $(REPO_DIR)/inference-engine/ie_bridges/python/requirements.txt
|
|
python3 -m pip install -r $(REPO_DIR)/inference-engine/ie_bridges/python/wheel/requirements-dev.txt
|
|
# For running Python API tests
|
|
python3 -m pip install -r $(REPO_DIR)/inference-engine/ie_bridges/python/src/requirements-dev.txt
|
|
# For running PaddlePaddle frontend unit tests
|
|
python3 -m pip install -r $(REPO_DIR)/ngraph/test/frontend/paddlepaddle/requirements_dev.txt
|
|
# For running ONNX frontend unit tests
|
|
python3 -m pip install -r $(REPO_DIR)/ngraph/test/requirements_test_onnx.txt
|
|
# For MO unit tests
|
|
python3 -m pip install -r $(REPO_DIR)/model-optimizer/requirements.txt
|
|
python3 -m pip install -r $(REPO_DIR)/model-optimizer/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
|
|
-DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS)
|
|
-DENABLE_GNA=$(CMAKE_BUILD_SHARED_LIBS)
|
|
-DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS)
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
|
|
-DENABLE_WHEEL=ON
|
|
-DENABLE_TESTS=ON
|
|
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON
|
|
-DENABLE_FASTER_BUILD=ON
|
|
-DENABLE_STRICT_DEPENDENCIES=OFF
|
|
-DENABLE_REQUIREMENTS_INSTALL=OFF
|
|
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
|
|
$(REPO_DIR)
|
|
workingDirectory: $(BUILD_DIR)
|
|
|
|
- script: ls -alR $(REPO_DIR)/inference-engine/temp/
|
|
displayName: 'List temp SDKs'
|
|
|
|
- script: ninja
|
|
workingDirectory: $(BUILD_DIR)
|
|
displayName: 'Build Lin'
|
|
|
|
- script: ls -alR $(REPO_DIR)/bin/
|
|
displayName: 'List bin files'
|
|
|
|
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
|
|
workingDirectory: $(BUILD_DIR)
|
|
displayName: 'Install'
|
|
|
|
- task: CMake@1
|
|
inputs:
|
|
cmakeArgs: >
|
|
-GNinja
|
|
$(REPO_DIR)/tests/layer_tests
|
|
workingDirectory: $(BUILD_LAYER_TESTS_DIR)
|
|
|
|
- script: ninja
|
|
workingDirectory: $(BUILD_LAYER_TESTS_DIR)
|
|
displayName: 'Build Layer Tests'
|
|
|
|
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
|
|
workingDirectory: $(BUILD_LAYER_TESTS_DIR)
|
|
displayName: 'Install Layer Tests'
|
|
|
|
- script: ls -alR $(INSTALL_DIR)
|
|
displayName: 'List install files'
|
|
|
|
- script: |
|
|
set -e
|
|
mkdir $(INSTALL_DIR)/opencv/
|
|
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P cmake_install.cmake
|
|
cp -R $(REPO_DIR)/inference-engine/temp/opencv_4.5.2_ubuntu20/opencv/* $(INSTALL_DIR)/opencv/
|
|
workingDirectory: $(BUILD_DIR)
|
|
displayName: 'Install tests'
|
|
|
|
- script: ls -alR $(INSTALL_DIR)
|
|
displayName: 'List install files'
|
|
|
|
- script: $(INSTALL_DIR)/samples/cpp/build_samples.sh
|
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
|
displayName: 'Build cpp samples'
|
|
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')
|
|
|
|
- script: $(INSTALL_DIR)/samples/c/build_samples.sh
|
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
|
displayName: 'Build c samples'
|
|
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')
|
|
|
|
- script: rm -fr $(BUILD_DIR)
|
|
displayName: 'Clean build dir'
|
|
continueOnError: false
|
|
|
|
# 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=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 Python Bindings Tests'
|
|
continueOnError: false
|
|
|
|
- script: |
|
|
export MO_ROOT=$(INSTALL_DIR)/tools/model_optimizer
|
|
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_DIR)/tests/model_optimizer/unit_tests --junitxml=TEST-ModelOptimizer.xml
|
|
displayName: 'Model Optimizer UT'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
|
workingDirectory: $(INSTALL_TEST_DIR)
|
|
displayName: 'nGraph UT'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/paddlepaddle_tests --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-PaddlePaddle.xml
|
|
displayName: 'PaddlePaddle Frontend UT'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/tensorflow_tests --gtest_print_time=1 --gtest_output=xml:TEST-Tensorflow.xml
|
|
displayName: 'Tensorflow Frontend UT'
|
|
continueOnError: false
|
|
|
|
# . $(SETUPVARS) && 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: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
|
|
displayName: 'IE UT old'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:TEST-ieUnitTests.xml
|
|
displayName: 'IE UT'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuUnitTests --gtest_output=xml:TEST-cpuUnitTests.xml
|
|
displayName: 'CPU UT'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/gnaUnitTests --gtest_output=xml:TEST-gnaUnitTests.xml
|
|
displayName: 'GNA UT'
|
|
continueOnError: false
|
|
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
|
|
displayName: 'VPU UT'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/onnxImporterUnitTests --gtest_output=xml:TEST-onnxImporterUnitTests.xml
|
|
displayName: 'ONNX Importer UT'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:TEST-ieFuncTests.xml
|
|
displayName: 'IE FuncTests'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/templateFuncTests --gtest_filter=*smoke* --gtest_output=xml:TEST-templateFuncTests.xml
|
|
displayName: 'TEMPLATE FuncTests'
|
|
continueOnError: false
|
|
|
|
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml
|
|
displayName: 'CPU FuncTests'
|
|
continueOnError: false
|
|
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF')
|
|
|
|
- script: |
|
|
export DATA_PATH=$(MODELS_PATH)
|
|
export MODELS_PATH=$(MODELS_PATH)
|
|
. $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml
|
|
displayName: 'IE CAPITests'
|
|
continueOnError: false
|
|
|
|
- script: |
|
|
export DATA_PATH=$(MODELS_PATH)
|
|
export MODELS_PATH=$(MODELS_PATH)
|
|
cd $(REPO_DIR)/inference-engine/ie_bridges/python/tests
|
|
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest --junitxml=TEST-PythonAPI.xml $(PYTHON_STATIC_ARGS)
|
|
displayName: 'Python API Tests'
|
|
continueOnError: false
|
|
|
|
- script: |
|
|
. $(SETUPVARS)
|
|
python3 -m pip install -r requirements.txt
|
|
export MO_ROOT=$(INSTALL_DIR)/tools/model_optimizer
|
|
export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH
|
|
python3 -m pytest tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=TEST-tf_Roll.xmlTEST
|
|
workingDirectory: $(LAYER_TESTS_DIR)
|
|
displayName: 'Layer Tests'
|
|
continueOnError: false
|
|
|
|
- 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
|