mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-23 19:32:23 +00:00
Cherry pick nuget RC version changes from main
(cherry picked from commit 36c9ae0f58)
This commit is contained in:
parent
96de9fe355
commit
ed46afd7e1
3 changed files with 79 additions and 18 deletions
|
|
@ -24,6 +24,32 @@ parameters:
|
|||
type: boolean
|
||||
default: false
|
||||
|
||||
- name: PreReleaseVersionSuffixString
|
||||
displayName: Suffix added to pre-release package version. Only used if IsReleaseBuild is true. Denotes the type of pre-release package.
|
||||
type: string
|
||||
values:
|
||||
- alpha
|
||||
- beta
|
||||
- rc
|
||||
- none
|
||||
default: none
|
||||
|
||||
- name: PreReleaseVersionSuffixNumber
|
||||
displayName: Number added to pre-release package version. Only used if IsReleaseBuild is true. Denotes the sequence of a pre-release package.
|
||||
type: number
|
||||
default: 0
|
||||
|
||||
# these 2 parameters are used for debugging.
|
||||
- name: SpecificArtifact
|
||||
displayName: Use Specific Artifact (Debugging only)
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
- name: BuildId
|
||||
displayName: Pipeline BuildId, you could find it in the URL
|
||||
type: string
|
||||
default: '0'
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: onnxruntime-inference-examples # The name used to reference this repository in the checkout step
|
||||
|
|
@ -36,7 +62,38 @@ resources:
|
|||
name: pypa/manylinux
|
||||
ref: aead4d751c2101e23336aa73f2380df83e7a13f3
|
||||
|
||||
variables:
|
||||
- name: ReleaseVersionSuffix
|
||||
value: ''
|
||||
|
||||
stages:
|
||||
- stage: Setup
|
||||
jobs:
|
||||
- job: Set_Variables
|
||||
steps:
|
||||
- checkout: none
|
||||
- bash: |
|
||||
if [[ "${{ parameters.IsReleaseBuild }}" = True && "${{ parameters.PreReleaseVersionSuffixString }}" != "none" ]]; then
|
||||
if [[ "${{ parameters.PreReleaseVersionSuffixNumber }}" -eq 0 ]]; then
|
||||
echo "##vso[task.setvariable variable=ReleaseVersionSuffix;isOutput=true]-${{ parameters.PreReleaseVersionSuffixString }}"
|
||||
else
|
||||
echo "##vso[task.setvariable variable=ReleaseVersionSuffix;isOutput=true]-${{ parameters.PreReleaseVersionSuffixString }}.${{ parameters.PreReleaseVersionSuffixNumber }}"
|
||||
fi
|
||||
else
|
||||
echo "##vso[task.setvariable variable=ReleaseVersionSuffix;isOutput=true]"
|
||||
fi
|
||||
name: Set_Release_Version_Suffix
|
||||
|
||||
- stage: Debug
|
||||
dependsOn: Setup
|
||||
jobs:
|
||||
- job: D1
|
||||
variables:
|
||||
MyVar: $[stageDependencies.Setup.Set_Variables.outputs['Set_Release_Version_Suffix.ReleaseVersionSuffix']]
|
||||
steps:
|
||||
- checkout: none
|
||||
- bash: echo $(MyVar)
|
||||
|
||||
- template: templates/c-api-cpu.yml
|
||||
parameters:
|
||||
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
||||
|
|
@ -485,6 +542,7 @@ stages:
|
|||
|
||||
- stage: NuGet_Packaging_GPU
|
||||
dependsOn:
|
||||
- Setup
|
||||
- Windows_Packaging_gpu
|
||||
- Windows_Packaging_tensorrt
|
||||
- Linux_C_API_Packaging_GPU_x64
|
||||
|
|
@ -499,6 +557,7 @@ stages:
|
|||
pool: 'Azure-Pipelines-EO-Windows2022-aiinfra'
|
||||
variables:
|
||||
breakCodesignValidationInjection: ${{ parameters.DoEsrp }}
|
||||
ReleaseVersionSuffix: $[stageDependencies.Setup.Set_Variables.outputs['Set_Release_Version_Suffix.ReleaseVersionSuffix']]
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
|
@ -575,7 +634,7 @@ stages:
|
|||
#
|
||||
# 'Any CPU' is the default (first 'mixed' platform specified in the csproj) so this should be fine.
|
||||
script: |
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu" -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu" -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
|
|
@ -593,7 +652,7 @@ stages:
|
|||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: RelWithDebInfo
|
||||
platform: 'Any CPU'
|
||||
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu" -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
||||
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu" -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- template: templates/win-esrp-dll.yml
|
||||
|
|
@ -617,7 +676,7 @@ stages:
|
|||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj'
|
||||
configuration: RelWithDebInfo
|
||||
platform: 'Any CPU'
|
||||
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
||||
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: BatchScript@1
|
||||
|
|
@ -852,31 +911,31 @@ stages:
|
|||
rename %%~ni.nupkg %%~ni.zip
|
||||
unzip %%~ni.zip -d %%~ni
|
||||
del /Q %%~ni.zip
|
||||
|
||||
|
||||
unzip win-dml-x86.zip -d win-x86
|
||||
mkdir %%~ni\runtimes\win-x86
|
||||
mkdir %%~ni\runtimes\win-x86\native
|
||||
|
||||
|
||||
move win-x86\runtimes\win-x86\native\onnxruntime.dll %%~ni\runtimes\win-x86\native\onnxruntime.dll
|
||||
move win-x86\runtimes\win-x86\native\onnxruntime.lib %%~ni\runtimes\win-x86\native\onnxruntime.lib
|
||||
move win-x86\runtimes\win-x86\native\onnxruntime.pdb %%~ni\runtimes\win-x86\native\onnxruntime.pdb
|
||||
|
||||
|
||||
unzip win-dml-arm64.zip -d win-arm64
|
||||
mkdir %%~ni\runtimes\win-arm64
|
||||
mkdir %%~ni\runtimes\win-arm64\native
|
||||
|
||||
|
||||
move win-arm64\runtimes\win-arm64\native\onnxruntime.dll %%~ni\runtimes\win-arm64\native\onnxruntime.dll
|
||||
move win-arm64\runtimes\win-arm64\native\onnxruntime.lib %%~ni\runtimes\win-arm64\native\onnxruntime.lib
|
||||
move win-arm64\runtimes\win-arm64\native\onnxruntime.pdb %%~ni\runtimes\win-arm64\native\onnxruntime.pdb
|
||||
|
||||
|
||||
unzip win-dml-arm.zip -d win-arm
|
||||
mkdir %%~ni\runtimes\win-arm
|
||||
mkdir %%~ni\runtimes\win-arm\native
|
||||
|
||||
|
||||
move win-arm\runtimes\win-arm\native\onnxruntime.dll %%~ni\runtimes\win-arm\native\onnxruntime.dll
|
||||
move win-arm\runtimes\win-arm\native\onnxruntime.lib %%~ni\runtimes\win-arm\native\onnxruntime.lib
|
||||
move win-arm\runtimes\win-arm\native\onnxruntime.pdb %%~ni\runtimes\win-arm\native\onnxruntime.pdb
|
||||
|
||||
|
||||
pushd %%~ni
|
||||
zip -r ..\%%~ni.zip .
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -274,6 +274,7 @@ stages:
|
|||
|
||||
- stage: NuGet_Packaging_CPU
|
||||
dependsOn:
|
||||
- Setup
|
||||
- Linux_C_API_Packaging_CPU
|
||||
- MacOS_C_API_Packaging_CPU
|
||||
- Windows_Packaging_CPU_x86_${{ parameters.BuildVariant }}
|
||||
|
|
@ -293,6 +294,7 @@ stages:
|
|||
variables:
|
||||
OrtPackageId: ${{ parameters.OrtNugetPackageId }}
|
||||
breakCodesignValidationInjection: ${{ parameters.DoEsrp }}
|
||||
ReleaseVersionSuffix: $[stageDependencies.Setup.Set_Variables.outputs['Set_Release_Version_Suffix.ReleaseVersionSuffix']]
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
|
@ -399,7 +401,7 @@ stages:
|
|||
#
|
||||
# 'Any CPU' is the default (first 'mixed' platform specified in the csproj) so this should be fine.
|
||||
script: |
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
|
|
@ -417,7 +419,7 @@ stages:
|
|||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
||||
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- ${{ if eq(parameters.DoEsrp, true) }}:
|
||||
|
|
@ -442,7 +444,7 @@ stages:
|
|||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
||||
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: CopyFiles@2
|
||||
|
|
@ -918,5 +920,3 @@ stages:
|
|||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
displayName: 'Clean Agent Directories'
|
||||
condition: always()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ stages:
|
|||
|
||||
- stage: NuGet_Packaging_Training_CPU
|
||||
dependsOn:
|
||||
- Setup
|
||||
- Linux_C_API_Packaging_Training_CPU
|
||||
- Windows_Packaging_Training_CPU_x86_${{ parameters.BuildVariant }}
|
||||
- Windows_Packaging_Training_CPU_x64_${{ parameters.BuildVariant }}
|
||||
|
|
@ -143,6 +144,7 @@ stages:
|
|||
variables:
|
||||
OrtPackageId: ${{ parameters.OrtNugetPackageId }}
|
||||
breakCodesignValidationInjection: ${{ parameters.DoEsrp }}
|
||||
ReleaseVersionSuffix: $[stageDependencies.Setup.Set_Variables.outputs['Set_Release_Version_Suffix.ReleaseVersionSuffix']]
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
|
@ -238,7 +240,7 @@ stages:
|
|||
#
|
||||
# 'Any CPU' is the default (first 'mixed' platform specified in the csproj) so this should be fine.
|
||||
script: |
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
|
|
@ -256,7 +258,7 @@ stages:
|
|||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
||||
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- ${{ if eq(parameters.DoEsrp, true) }}:
|
||||
|
|
@ -281,7 +283,7 @@ stages:
|
|||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}'
|
||||
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=$(OrtPackageId) -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: CopyFiles@2
|
||||
|
|
|
|||
Loading…
Reference in a new issue