-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a new pipeline for pubilshing cuda 12 nuget packages (#18713)
### Description <!-- Describe your changes. --> ### 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. -->
- Loading branch information
Showing
2 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
tools/ci_build/github/azure-pipelines/nuget-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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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: 'Nuget-CUDA-Packaging-Pipeline' | ||
|
||
stages: | ||
- template: stages/nuget-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 |
59 changes: 59 additions & 0 deletions
59
tools/ci_build/github/azure-pipelines/stages/nuget-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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
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' | ||
|
||
stages: | ||
- stage: NuGet_Publishing_GPU | ||
${{ if ne(parameters.dependencies, 'none') }}: | ||
dependsOn: | ||
${{ if eq(parameters.dependencies, 'none') }}: | ||
dependsOn: [] | ||
jobs: | ||
- job: | ||
pool: 'onnxruntime-Win-CPU-2022' | ||
steps: | ||
- checkout: none | ||
- script: | | ||
echo "Project: ${{ parameters.project }}" | ||
echo "Build ID: ${{ parameters.build_id }}" | ||
echo "Pipeline: ${{ parameters.pipeline }}" | ||
echo "Artifact Feed: ${{ parameters.artifact_feed }}" | ||
displayName: 'Print Parameters' | ||
- task: DownloadPipelineArtifact@2 | ||
displayName: 'Download NuGet artifact drop-signed-nuget-GPU' | ||
inputs: | ||
artifact: drop-signed-nuget-GPU | ||
targetPath: $(Build.BinariesDirectory)/nuget-artifact/final-package | ||
${{ if ne(parameters.build_id, 'latest') }}: | ||
buildType: 'specific' | ||
project: '${{ parameters.project }}' | ||
pipeline: '${{ parameters.pipeline }}' | ||
buildVersionToDownload: 'specific' | ||
buildId: '${{ parameters.build_id }}' | ||
- script: | | ||
ls $(Build.BinariesDirectory)/nuget-artifact/final-package | ||
displayName: List Downloaded Package | ||
- template: ../nuget/templates/get-nuget-package-version-as-variable.yml | ||
parameters: | ||
packageFolder: '$(Build.BinariesDirectory)/nuget-artifact/final-package' | ||
#This task must be run on a Windows machine | ||
- task: NuGetCommand@2 | ||
displayName: 'NuGet push ${{ parameters.artifact_feed }}' | ||
inputs: | ||
command: push | ||
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/*.nupkg' | ||
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/d3daa2b0-aa56-45ac-8145-2c3dc0661c87' | ||
allowPackageConflicts: true | ||
|
||
|
||
|