onnxruntime/tools/ci_build/github/azure-pipelines/py-packaging-pipeline.yml
Changming Sun 6db72165eb
Fix python packaging test pipeline (#17204)
### Description
1. Fix python packaging test pipeline. There was an error in
tools/ci_build/github/linux/run_python_tests.sh that it installed a
released version of onnxruntime python package from pypi.org to run the
test. Supposedly it should pick one from the current build.
2. Refactor the pipeline to allow choosing cmake build type from the web
UI when manually trigger a build. Now this feature is for Linux only.
Because I don't want to change too much when we are about to cut a
release branch. After that I will expand it to all platforms. This
feature is useful for debugging pipeline issues, also, we may consider
having a nightly pipeline to run all tests in Debug mode which may catch
extra bugs because in debug mode we can enforce range check.

Test run:
https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=342674&view=results

### Motivation and Context
Currently the pipeline has a crash error. 

AB#18580
2023-08-18 14:51:26 -07:00

74 lines
No EOL
1.9 KiB
YAML

parameters:
- name: enable_linux_cpu
displayName: 'Whether Linux CPU package is built.'
type: boolean
default: true
- name: enable_linux_gpu
displayName: 'Whether Linux GPU package is built.'
type: boolean
default: true
- name: enable_windows_cpu
displayName: 'Whether Windows CPU package is built.'
type: boolean
default: true
- name: enable_windows_gpu
displayName: 'Whether Windows GPU package is built.'
type: boolean
default: true
- name: enable_mac_cpu
displayName: 'Whether Mac CPU package is built.'
type: boolean
default: true
- name: enable_mac_silicon
displayName: 'Whether Mac silicon package is built.'
type: boolean
default: true
- name: enable_linux_arm
displayName: 'Whether Linux ARM package is built.'
type: boolean
default: true
- name: build_py_parameters
displayName: 'Specify extra build parameters'
type: string
default: '--use_azure'
# TODO: Now the Windows jobs use a different cmake build type. Consider to merge it.
- name: cmake_build_type
type: string
displayName: 'Linux packages cmake build type. Linux Only.'
default: 'Release'
values:
- Debug
- Release
- RelWithDebInfo
- MinSizeRel
trigger: none
resources:
repositories:
- repository: manylinux
type: Github
endpoint: Microsoft
name: pypa/manylinux
ref: 5eda9aded5462201e6310105728d33016e637ea7
stages:
- template: templates/py-packaging-stage.yml
parameters:
enable_linux_gpu: ${{ parameters.enable_linux_gpu }}
enable_linux_cpu: ${{ parameters.enable_linux_cpu }}
enable_windows_cpu: ${{ parameters.enable_windows_cpu }}
enable_windows_gpu: ${{ parameters.enable_windows_gpu }}
enable_mac_cpu: ${{ parameters.enable_mac_cpu }}
enable_mac_silicon: ${{ parameters.enable_mac_silicon }}
enable_linux_arm: ${{ parameters.enable_linux_arm }}
build_py_parameters: ${{ parameters.build_py_parameters }}
cmake_build_type: ${{ parameters.cmake_build_type }}