trigger: branches: include: - 'master' - 'releases/*' paths: exclude: - '*/docs/*' - 'docs/*' - '*/*.md' - '*.md' - '*/layer_tests_summary/*' - '*/conformance/*' - 'tools/*' - 'tests/layer_tests/*' pr: drafts: 'false' branches: include: - 'master' - 'releases/*' paths: exclude: - '*/docs/*' - 'docs/*' - '*/*.md' - '*.md' - '*/layer_tests_summary/*' - '*/conformance/*' - 'tools/*' - 'tests/layer_tests/*' variables: - group: github jobs: - job: onnxruntime timeoutInMinutes: '90' pool: name: LIN_VMSS_VENV_ONNX_U20_WU2 variables: system.debug: true VSTS_HTTP_RETRY: 5 VSTS_HTTP_TIMEOUT: 200 BUILD_TYPE: Release REPO_DIR: $(Build.Repository.LocalPath) ONNXRUNTIME_REPO_DIR: $(REPO_DIR)/../onnxruntime WORK_DIR: $(Pipeline.Workspace)/_w MODELS_DIR: /mount/cinfsshare/onnxtestdata TMP_DIR: /mnt/tmp INSTALL_DIR: $(WORK_DIR)/install_pkg/openvino BUILD_DIR: $(WORK_DIR)/build ONNXRUNTIME_UTILS: $(REPO_DIR)/.ci/azure/ci_utils/onnxruntime ONNXRUNTIME_BUILD_DIR: $(ONNXRUNTIME_REPO_DIR)/build 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 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) sudo rm -rf $(TMP_DIR) ; sudo mkdir $(TMP_DIR) ; sudo chmod 777 -R $(TMP_DIR) sudo mkdir -p $(MODELS_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 $(MODELS_DIR) -o vers=4,minorversion=1,sec=sys displayName: 'Make dirs' - checkout: self clean: 'true' submodules: 'true' path: openvino - script: | set -e branch=`tr -s '\n ' < $(ONNXRUNTIME_UTILS)/version` git clone --branch $branch --single-branch --recursive https://github.com/microsoft/onnxruntime.git $(ONNXRUNTIME_REPO_DIR) displayName: 'Clone onnxruntime' - 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' - task: CMake@1 inputs: # CMake must get Python 3.x version by default cmakeArgs: > -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_INTEL_GNA=OFF -DENABLE_INTEL_GPU=OFF -DENABLE_CPPLINT=OFF -DENABLE_PROFILING_ITT=OFF -DENABLE_SAMPLES=OFF -DENABLE_OV_TF_FRONTEND=OFF -DENABLE_OV_PADDLE_FRONTEND=OFF -DENABLE_OV_PYTORCH_FRONTEND=OFF -DENABLE_OPENVINO_DEBUG=OFF -S $(REPO_DIR) -B $(BUILD_DIR) - script: cmake --build $(BUILD_DIR) --parallel --config $(BUILD_TYPE) displayName: 'Build Lin ONNX' - 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 OpenVINO' - script: | set -e source $(INSTALL_DIR)/setupvars.sh $(ONNXRUNTIME_REPO_DIR)/build.sh \ --config RelWithDebInfo \ --use_openvino CPU_FP32 \ --build_shared_lib \ --parallel \ --skip_tests \ --build_dir $(ONNXRUNTIME_BUILD_DIR) env: CXXFLAGS: "-Wno-error=deprecated-declarations" displayName: 'Build Lin ONNX Runtime' - script: | set -e source $(INSTALL_DIR)/setupvars.sh skip_tests=$(tr -s '\n ' ':' < $(ONNXRUNTIME_UTILS)/skip_tests) ./onnxruntime_test_all --gtest_filter=-$skip_tests workingDirectory: $(ONNXRUNTIME_BUILD_DIR)/RelWithDebInfo displayName: 'Run onnxruntime_test_all' - script: | set -e source $(INSTALL_DIR)/setupvars.sh ./onnxruntime_shared_lib_test --gtest_filter=-CApiTest.test_custom_op_openvino_wrapper_library workingDirectory: $(ONNXRUNTIME_BUILD_DIR)/RelWithDebInfo displayName: 'Run onnxruntime_shared_lib_test' - script: | set -e source $(INSTALL_DIR)/setupvars.sh ./onnxruntime_global_thread_pools_test workingDirectory: $(ONNXRUNTIME_BUILD_DIR)/RelWithDebInfo displayName: 'Run onnxruntime_global_thread_pools_test' - script: | set -e source $(INSTALL_DIR)/setupvars.sh ./onnxruntime_api_tests_without_env workingDirectory: $(ONNXRUNTIME_BUILD_DIR)/RelWithDebInfo displayName: 'Run onnxruntime_api_tests_without_env' - script: | set -e source $(INSTALL_DIR)/setupvars.sh ./onnx_test_runner "$(ONNXRUNTIME_REPO_DIR)/cmake/external/onnx/onnx/backend/test/data/pytorch-converted" workingDirectory: $(ONNXRUNTIME_BUILD_DIR)/RelWithDebInfo displayName: 'Run pytorch-converted tests' - script: | set -e source $(INSTALL_DIR)/setupvars.sh ./onnx_test_runner "$(ONNXRUNTIME_REPO_DIR)/cmake/external/onnx/onnx/backend/test/data/pytorch-operator" workingDirectory: $(ONNXRUNTIME_BUILD_DIR)/RelWithDebInfo displayName: 'Run pytorch-operator tests'