forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update py-publishing pipeline to use the resoure from packaging pipel…
…ine (microsoft#20888) ### Description <!-- Describe your changes. --> ### Motivation and Context To allow nightly release to be automatic triggered
- Loading branch information
Showing
2 changed files
with
47 additions
and
66 deletions.
There are no files selected for viewing
40 changes: 21 additions & 19 deletions
40
tools/ci_build/github/azure-pipelines/py-cuda-publishing-pipeline.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
resources: | ||
pipelines: | ||
- pipeline: build | ||
source: 'Python-CUDA-Packaging-Pipeline' | ||
trigger: | ||
branches: | ||
include: | ||
- main | ||
branch: main | ||
|
||
parameters: | ||
- name: nightly | ||
type: string | ||
default: '1' | ||
- name: build_id | ||
type: string | ||
default: 'latest' | ||
- name: project | ||
type: string | ||
default: 'Lotus' | ||
- name: pipeline | ||
type: string | ||
default: 'Python-CUDA-Packaging-Pipeline' | ||
- name: isReleaseBuild | ||
type: boolean | ||
default: false | ||
|
||
variables: | ||
- name: ArtifactFeed | ||
${{ if eq(parameters.isReleaseBuild, false) }}: | ||
value: ort-cuda-12-nightly | ||
${{ else }}: | ||
value: onnxruntime-cuda-12 | ||
|
||
stages: | ||
- template: stages/py-cuda-publishing-stage.yml | ||
parameters: | ||
build_id: ${{ parameters.build_id }} | ||
project: ${{ parameters.project }} | ||
pipeline: ${{ parameters.pipeline }} | ||
${{ if ne(parameters.nightly, '1') }}: | ||
artifact_feed: onnxruntime-cuda-12 | ||
${{ else }}: | ||
artifact_feed: ort-cuda-12-nightly | ||
artifact_feed: $(ArtifactFeed) |
73 changes: 26 additions & 47 deletions
73
tools/ci_build/github/azure-pipelines/stages/py-cuda-publishing-stage.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,30 @@ | ||
parameters: | ||
- name: build_id | ||
type: string | ||
- name: project | ||
type: string | ||
- name: pipeline | ||
type: string | ||
- name: artifact_feed | ||
type: string | ||
default: 'onnxruntime-cuda-12' | ||
- name: dependencies | ||
type: string | ||
default: 'none' | ||
- name: artifact_feed | ||
type: string | ||
default: 'onnxruntime-cuda-12' | ||
|
||
stages: | ||
- stage: Python_Publishing | ||
${{ if ne(parameters.dependencies, 'none') }}: | ||
dependsOn: ${{ parameters.dependencies }} | ||
${{ if eq(parameters.dependencies, 'none') }}: | ||
dependsOn: [] | ||
jobs: | ||
- job: | ||
pool: 'onnxruntime-Ubuntu2204-AMD-CPU' | ||
steps: | ||
- checkout: none | ||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
artifact: 'onnxruntime_gpu' | ||
targetPath: '$(Build.SourcesDirectory)/onnxruntime-gpu' | ||
${{ if ne(parameters.build_id, 'latest') }}: | ||
buildType: 'specific' | ||
project: '${{ parameters.project }}' | ||
pipeline: '${{ parameters.pipeline }}' | ||
buildVersionToDownload: 'specific' | ||
buildId: '${{ parameters.build_id }}' | ||
displayName: 'Download Build Artifacts - onnxruntime-gpu' | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.x' | ||
- script: 'pip install twine==3.4.2' | ||
displayName: 'Install Twine' | ||
- task: TwineAuthenticate@1 | ||
displayName: 'Twine Authenticate ' | ||
inputs: | ||
artifactFeed: PublicPackages/${{ parameters.artifact_feed }} | ||
- script: 'python -m twine upload -r ${{ parameters.artifact_feed }} --config-file $(PYPIRC_PATH) --non-interactive --skip-existing *.whl' | ||
workingDirectory: '$(Build.SourcesDirectory)/onnxruntime-gpu' | ||
displayName: 'Uploading wheels to ${{ parameters.artifact_feed }}' | ||
retryCountOnTaskFailure: 3 | ||
env: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
- stage: Python_Publishing_GPU | ||
jobs: | ||
- job: | ||
pool: 'onnxruntime-Ubuntu2204-AMD-CPU' | ||
steps: | ||
- checkout: none | ||
- download: build | ||
displayName: 'Download Pipeline Artifact - onnxruntime_gpu' | ||
artifact: 'onnxruntime_gpu' | ||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.x' | ||
- script: 'pip install twine==3.4.2' | ||
displayName: 'Install Twine' | ||
- task: TwineAuthenticate@1 | ||
displayName: 'Twine Authenticate ' | ||
inputs: | ||
artifactFeed: PublicPackages/${{ parameters.artifact_feed }} | ||
- script: 'python -m twine upload -r ${{ parameters.artifact_feed }} --config-file $(PYPIRC_PATH) --non-interactive --skip-existing *.whl' | ||
workingDirectory: '$(Pipeline.Workspace)/build/onnxruntime_gpu' | ||
displayName: 'Uploading wheels to ${{ parameters.artifact_feed }}' | ||
retryCountOnTaskFailure: 3 | ||
env: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
|