Override native package name. Preserve managed package name the same. (#3133)

Override native package name. Preserve managed package name the same.
  Specify pckage name for validation purposes.
 Fix up validation package name parameter.
This commit is contained in:
Dmitri Smirnov 2020-03-04 10:12:55 -08:00 committed by GitHub
parent a2eeb126b9
commit ef8768a53f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 32 deletions

View file

@ -1,27 +0,0 @@
# Bundle dlls, so and dylib into respective runtime folders
steps:
- script: |
pushd $(Build.BinariesDirectory)\nuget-artifact
dir
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/unzip.exe -OutFile unzip.exe"
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/zip.exe -OutFile zip.exe"
set PATH=%CD%;%PATH%
FOR /R %%i IN (*.nupkg) do (
rename %%~ni.nupkg %%~ni.zip
unzip %%~ni.zip -d %%~ni
del /Q %%~ni.zip
unzip win-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
pushd %%~ni
zip -r ..\%%~ni.zip .
popd
move %%~ni.zip %%~ni.nupkg
)
popd
copy $(Build.BinariesDirectory)\nuget-artifact\*.nupkg $(Build.ArtifactStagingDirectory)
displayName: 'Bundle NuGet and other binaries'

View file

@ -1,7 +1,7 @@
parameters:
DoEsrp: 'false'
PackageNameNative: 'Microsoft.ML.ORTFeaturizers'
PackageNameManaged: 'Microsoft.ML.ORTFeaturizers.Managed'
PackageNameManaged: 'Microsoft.ML.OnnxRuntime.Managed'
PackageName: 'Microsoft.ML.ORTFeaturizers'
DoCompliance: 'false'
jobs:
@ -19,7 +19,7 @@ jobs:
DoCompliance: ${{ parameters.DoCompliance }}
DoEsrp: ${{ parameters.DoEsrp }}
NuPackScript: |
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=$(PackageName)
copy $(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
mkdir $(Build.ArtifactStagingDirectory)\testdata
@ -39,7 +39,7 @@ jobs:
DoCompliance: ${{ parameters.DoCompliance }}
DoEsrp: ${{ parameters.DoEsrp }}
NuPackScript: |
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=x86 /t:CreatePackage
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=x86 /t:CreatePackage /p:OrtPackageId=$(PackageName)
cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\
ren *.nupkg win-x86.zip
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*zip $(Build.ArtifactStagingDirectory)
@ -152,6 +152,7 @@ jobs:
- template: ../../templates/validate-nuget.yml
parameters:
NugetPath: '$(Build.ArtifactStagingDirectory)'
NugetPackage: 'Microsoft.ML.ORTFeaturizers*nupkg'
PlatformsSupported: 'win-x64,win-x86,linux-x64,osx-x64'
VerifyNugetSigning: ${{ parameters.DoEsrp }}
@ -184,7 +185,7 @@ jobs:
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
inputs:
command: 'push'
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/$(PackageNameNative).$(NuGetPackageVersionNumber).nupkg'
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/$(PackageName).$(NuGetPackageVersionNumber).nupkg'
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'
- task: NuGetCommand@2