240 lines
8.5 KiB
YAML
240 lines
8.5 KiB
YAML
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
|
|
# About 150% of total time
|
|
timeoutInMinutes: 90
|
|
|
|
pool:
|
|
name: LIN_VMSS_VENV_F16S_WU2
|
|
|
|
variables:
|
|
system.debug: true
|
|
VSTS_HTTP_RETRY: 5
|
|
VSTS_HTTP_TIMEOUT: 200
|
|
WORKERS_NUMBER: 16
|
|
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
|
|
INSTALL_DIR: $(WORK_DIR)/install_pkg
|
|
INSTALL_TEST_DIR: $(INSTALL_DIR)/tests
|
|
SETUPVARS: $(INSTALL_DIR)/bin/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
|
|
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
|
|
|
|
- checkout: testdata
|
|
clean: true
|
|
lfs: true
|
|
path: testdata
|
|
|
|
- script: |
|
|
sudo apt --assume-yes install libusb-1.0-0-dev
|
|
# For opencv-python: setuptools and upgrade
|
|
sudo apt-get install python3-setuptools patchelf
|
|
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 nGraph unit tests dependent on Python frameworks
|
|
python3 -m pip install -r $(REPO_DIR)/ngraph/test/requirements_test.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.0/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'
|
|
|
|
- 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.6
|
|
-DENABLE_WHEEL=ON
|
|
-DENABLE_TESTS=ON
|
|
-DNGRAPH_ONNX_IMPORT_ENABLE=ON
|
|
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON
|
|
-DENABLE_FASTER_BUILD=ON
|
|
-DENABLE_STRICT_DEPENDENCIES=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'
|
|
|
|
- script: ls -alR $(INSTALL_DIR)
|
|
displayName: 'List install files'
|
|
|
|
- script: |
|
|
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_ubuntu18/opencv/* $(INSTALL_DIR)/opencv/
|
|
workingDirectory: $(BUILD_DIR)
|
|
displayName: 'Install tests'
|
|
|
|
- script: ls -alR $(INSTALL_DIR)
|
|
displayName: 'List install files'
|
|
|
|
- script: $(INSTALL_DIR)/deployment_tools/inference_engine/samples/cpp/build_samples.sh
|
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
|
displayName: 'Build cpp samples'
|
|
|
|
- script: $(INSTALL_DIR)/deployment_tools/inference_engine/samples/c/build_samples.sh
|
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
|
displayName: 'Build c samples'
|
|
|
|
- script: rm -fr $(BUILD_DIR)
|
|
displayName: 'Clean build dir'
|
|
continueOnError: false
|
|
|
|
- script: |
|
|
export MO_ROOT=$(INSTALL_DIR)/deployment_tools/model_optimizer
|
|
. $(SETUPVARS) -pyver 3.6 && python3 -m pytest -s $(INSTALL_DIR)/deployment_tools/model_optimizer/unit_tests --junitxml=TEST-ModelOptimizer.xml
|
|
displayName: 'Model Optimizer UT'
|
|
continueOnError: false
|
|
|
|
- script: |
|
|
export FE_TEST_MODELS=$(INSTALL_DIR)/tests
|
|
. $(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
|
|
|
|
# . $(SETUPVARS) && python3 $(WORK_DIR)/gtest-parallel/gtest_parallel.py $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --workers=$(WORKERS_NUMBER) --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
|
|
|
|
- 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
|
|
|
|
- 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.6 && pytest pytest --junitxml=TEST-PythonAPI.xml
|
|
displayName: 'Python API Tests'
|
|
continueOnError: false
|
|
enabled: 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
|