Add mac packages smoking test (#15122)

### Description
Check the Mac x86_64 packages installation.

### Motivation and Context
To avoid installation error, add packages smoking test before release.
This commit is contained in:
Yi Zhang 2023-03-21 18:02:44 +08:00 committed by GitHub
parent abb2418c02
commit a3570eb5bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ stages:
device: 'CPU'
- stage: Linux_Test_CPU_aarch64_stage
dependsOn:
dependsOn: []
jobs:
- template: templates/py-packaging-linux-test.yml
parameters:
@ -22,12 +22,74 @@ stages:
machine_pool: 'aiinfra-linux-ARM64-CPU-2019'
device: 'CPU'
- stage: Packages_Somking_Test
dependsOn: []
jobs:
- job: MacOS_py_Wheels
timeoutInMinutes: 30
workspace:
clean: all
pool:
vmImage: 'macOS-12'
variables:
MACOSX_DEPLOYMENT_TARGET: '10.15'
strategy:
matrix:
Python38:
PythonVersion: '3.8'
Python39:
PythonVersion: '3.9'
Python310:
PythonVersion: '3.10'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: $(PythonVersion)
- task: DownloadPipelineArtifact@2
displayName: 'Download Pipeline Artifact'
inputs:
artifactName: 'onnxruntime'
targetPath: '$(Build.BinariesDirectory)/whl'
itemPattern: '*/*mac*x86_64.whl'
# 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
- script: |
set -ex
cd $(Build.BinariesDirectory)
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__)"
displayName: Test Package Installation
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()
# ****The following Stage depend on all previous tags. ***
# GPU resources are very limited,
# To utilize gpu resource more efficiently, run GPU job only after all cpus jobs succeed
- stage: Linux_Test_GPU_x86_64_stage
dependsOn:
- Linux_Test_CPU_x86_64_stage
- Linux_Test_CPU_aarch64_stage
- Packages_Somking_Test
jobs:
- template: templates/py-packaging-linux-test.yml
parameters:
@ -41,9 +103,7 @@ stages:
# if final job not extecuted, it will not run nightlly build
- stage: Final
dependsOn:
- Linux_Test_CPU_x86_64_stage
- Linux_Test_CPU_aarch64_stage
- Linux_Test_GPU_x86_64_stage
- Linux_Test_GPU_x86_64_stage
jobs:
- job: Final
#Run this step only if all previous steps are succeeded and (this build was triggered by a resource trigger or it was triggered by another build).