onnxruntime/tools/ci_build/github/azure-pipelines/py-package-test-pipeline.yml
Changming Sun 626d94aa23
Refactor python packaging pipeline and nuget packaging pipeline (#12945)
1. Move the Linux ARM64 part of python packaging pipeline to a real ARM64 machine pool
2. Refactor the Linux CPU build jobs of python packaging pipeline to two parts: build and test. The test part will be exempted from Cyber EO compliance requirements as it won't affect the final bits we publish. This refactoring is to reduce dependencies in the build part. For example, this PR remove pytorch from the build dependencies.
3. Combine DML nuget packaging pipeline with "Zip-Nuget-Java-Nodejs Packaging Pipeline" as they all produce ORT nuget packages. Also, publish DML nuget packages and ORT GPU nuget packages to https://aiinfra.visualstudio.com/PublicPackages/_artifacts/feed/ORT-Nightly feed.
2022-09-13 14:50:31 -07:00

67 lines
2.2 KiB
YAML

resources:
pipelines:
- pipeline: build
source: 'Python packaging pipeline'
trigger: true
jobs:
- job: Linux_Test
timeoutInMinutes: 60
variables:
skipComponentGovernanceDetection: true
workspace:
clean: all
pool: Linux-CPU
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download Pipeline Artifact'
inputs:
preferTriggeringPipeline: true
artifactName: 'drop-linux-cpu-x86_64'
targetPath: '$(Build.BinariesDirectory)/Release'
runVersion: 'latest'
buildType: specific
project: '530acbc4-21bc-487d-8cd8-348ff451d2ff'
definition: 841
#buildVersionToDownload: specific
#pipelineId: 227749
- task: DownloadPipelineArtifact@2
displayName: 'Download Pipeline Artifact'
inputs:
preferTriggeringPipeline: true
artifactName: 'onnxruntime'
targetPath: '$(Build.BinariesDirectory)/whl'
runVersion: 'latest'
buildType: specific
project: '530acbc4-21bc-487d-8cd8-348ff451d2ff'
definition: 841
#buildVersionToDownload: specific
#pipelineId: 227749
- task: Bash@3
displayName: 'Bash Script'
inputs:
targetType: filePath
filePath: tools/ci_build/github/linux/run_python_tests.sh
- task: PowerShell@2
displayName: 'Add Build Tag'
#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).
condition: and(succeeded(), eq(variables['Build.Reason'], 'ResourceTrigger'))
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
targetType: inline
script: |
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer $env:SYSTEM_ACCESSTOKEN")
$headers.Add("Content-Type", "application/json")
$uri = "https://dev.azure.com/aiinfra/Lotus/_apis/build/builds/$(resources.pipeline.build.runID)/tags/test%20pass?api-version=6.0"
Invoke-RestMethod -Uri $uri -Headers $headers -Method PUT
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()