mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-16 01:33:39 +00:00
### Description Upgrade remainding python to 3.11 removing 3.7 ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
76 lines
2 KiB
YAML
76 lines
2 KiB
YAML
parameters:
|
|
- name: job_name
|
|
type: string
|
|
|
|
- name: itemPattern
|
|
type: string
|
|
default: '**'
|
|
|
|
- name: machine_pool
|
|
type: object
|
|
|
|
- name: python_arch
|
|
type: string
|
|
default: 'x64'
|
|
|
|
jobs:
|
|
- job: ${{ parameters.job_name }}
|
|
timeoutInMinutes: 30
|
|
workspace:
|
|
clean: all
|
|
pool:
|
|
${{ parameters.machine_pool }}
|
|
strategy:
|
|
matrix:
|
|
Python38:
|
|
PythonVersion: '3.8'
|
|
Python39:
|
|
PythonVersion: '3.9'
|
|
Python310:
|
|
PythonVersion: '3.10'
|
|
Python311:
|
|
PythonVersion: '3.11'
|
|
steps:
|
|
- checkout: none
|
|
|
|
- task: UsePythonVersion@0
|
|
displayName: 'Use Python'
|
|
inputs:
|
|
versionSpec: $(PythonVersion)
|
|
architecture: ${{ parameters.python_arch }}
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
displayName: 'Download Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'onnxruntime'
|
|
targetPath: '$(Build.BinariesDirectory)/whl'
|
|
itemPattern: ${{parameters.itemPattern}}
|
|
# The public ADO project
|
|
${{ if eq(variables['System.CollectionId'], 'f3ad12f2-e480-4533-baf2-635c95467d29') }}:
|
|
buildType: current
|
|
# The private ADO project
|
|
${{ if eq(variables['System.CollectionId'], 'bc038106-a83b-4dab-9dd3-5a41bc58f34c') }}:
|
|
project: '530acbc4-21bc-487d-8cd8-348ff451d2ff'
|
|
definition: 841
|
|
preferTriggeringPipeline: true
|
|
runVersion: 'latest'
|
|
buildType: specific
|
|
|
|
- task: Bash@3
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
set -ex
|
|
files=(whl/*.whl)
|
|
FILE_NAME="${files[0]}"
|
|
FILE_NAME=$(basename $FILE_NAME)
|
|
PYTHON_PACKAGE_NAME=$(echo "$FILE_NAME" | cut -f 1 -d '-')
|
|
python3 -m pip install --find-links "$(Build.BinariesDirectory)/whl" $PYTHON_PACKAGE_NAME
|
|
pip show $PYTHON_PACKAGE_NAME
|
|
python -c "import onnxruntime as ort; print(ort.__version__)"
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
displayName: Test Package Installation
|
|
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
displayName: 'Clean Agent Directories'
|
|
condition: always()
|