yoloserv/modules/openvino-master/.ci/azure/linux_conditional_compilation.yml
2024-01-22 10:12:33 -04:00

173 lines
4.7 KiB
YAML

trigger:
branches:
include:
- 'master'
- 'releases/*'
paths:
exclude:
- '*/docs/*'
- 'docs/*'
- '*/*.md'
- '*.md'
- '*/layer_tests_summary/*'
- '*/conformance/*'
- 'tools/*'
pr:
drafts: 'false'
branches:
include:
- 'master'
- 'releases/*'
paths:
exclude:
- '*/docs/*'
- 'docs/*'
- '*/*.md'
- '*.md'
- '*/layer_tests_summary/*'
- '*/conformance/*'
- 'tools/*'
resources:
repositories:
- repository: testdata
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/testdata
ref: master
variables:
- group: github
jobs:
- job: LinCC
# 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)
MODELS_PATH: $(REPO_DIR)/../testdata
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
INSTALL_DIR: $(WORK_DIR)/install_pkg
SETUPVARS: $(INSTALL_DIR)/setupvars.sh
LD_LIBRARY_PATH: $(Agent.ToolsDirectory)/Python/$(OV_PYTHON_VERSION)/x64/lib
OV_PYTHON_VERSION: 3.11.2 # Full version of Python its required for LD_LIBRARY_PATH. More details https://github.com/microsoft/azure-pipelines-tool-lib/blob/master/docs/overview.md#tool-cache
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(OV_PYTHON_VERSION)' # Setting only major & minor version will download latest release from GH repo example 3.10 will be 3.10.10.
addToPath: true
disableDownloadFromRegistry: false
architecture: 'x64'
githubToken: $(auth_token)
displayName: Setup Python 3.11
name: setupPython
- bash: |
#!/bin/bash
python -V
- 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: |
set -e
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
displayName: 'Make dir'
- checkout: self
clean: 'true'
submodules: 'true'
path: openvino
- script: |
set -e
sudo -E $(REPO_DIR)/install_build_dependencies.sh
# Speed up build
sudo apt -y --no-install-recommends install unzip
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/
displayName: 'Install dependencies'
- checkout: testdata
clean: 'true'
lfs: 'true'
path: testdata
- task: CMake@1
inputs:
cmakeArgs: >
-G "Ninja Multi-Config"
-DENABLE_CPPLINT=OFF
-DENABLE_GAPI_PREPROCESSING=OFF
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DENABLE_FASTER_BUILD=ON
-DENABLE_PROFILING_ITT=ON
-DSELECTIVE_BUILD=COLLECT
-S $(REPO_DIR)
-B $(BUILD_DIR)
displayName: 'Cmake CC COLLECT'
- script: cmake --build $(BUILD_DIR) --parallel --config $(BUILD_TYPE) --target openvino_intel_cpu_plugin openvino_ir_frontend benchmark_app sea_itt_lib
displayName: 'Build CC COLLECT'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List bin files'
- script: |
set -e
python3 $(REPO_DIR)/thirdparty/itt_collector/runtool/sea_runtool.py \
--bindir $(REPO_DIR)/bin/intel64/Release -o $(BUILD_DIR)/itt_stat ! \
$(REPO_DIR)/bin/intel64/Release/benchmark_app -niter 1 -nireq 1 \
-m $(MODELS_PATH)/models/test_model/test_model_fp32.xml -d CPU
displayName: 'Code usage analysis'
- task: CMake@1
inputs:
cmakeArgs: >
-DSELECTIVE_BUILD=ON
-DSELECTIVE_BUILD_STAT=$(BUILD_DIR)/*.csv
-B $(BUILD_DIR)
-S $(REPO_DIR)
displayName: 'CMake CC ON'
- script: cmake --build $(BUILD_DIR) --parallel --config $(BUILD_TYPE) --target openvino_intel_cpu_plugin openvino_ir_frontend
displayName: 'Build CC ON'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List bin files ON'
- script: |
$(REPO_DIR)/bin/intel64/Release/benchmark_app -niter 1 -nireq 1 \
-m $(MODELS_PATH)/models/test_model/test_model_fp32.xml -d CPU
displayName: 'Use OpenVINO after CC'