Skip to content

Commit 6e006b5

Browse files
committed
Add arm64 and arm check, sign nuget, add gpu.linux dependency
1 parent a3749f1 commit 6e006b5

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

csharp/src/Microsoft.ML.OnnxRuntime/targets/netstandard/props.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@
113113

114114
<!-- arm64 -->
115115
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm64\native\onnxruntime.dll"
116-
Condition="'$(PlatformTarget)' == 'ARM64'">
116+
Condition="'$(PlatformTarget)' == 'ARM64' AND
117+
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-arm64\native\onnxruntime.dll')">
117118
<Link>onnxruntime.dll</Link>
118119
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
119120
<Visible>false</Visible>
@@ -128,7 +129,8 @@
128129

129130
<!-- arm -->
130131
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm\native\onnxruntime.dll"
131-
Condition="'$(PlatformTarget)' == 'ARM'">
132+
Condition="'$(PlatformTarget)' == 'ARM' AND
133+
Exists('$(MSBuildThisFileDirectory)..\..\runtimes\win-arm\native\onnxruntime.dll')">
132134
<Link>onnxruntime.dll</Link>
133135
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
134136
<Visible>false</Visible>

tools/ci_build/github/azure-pipelines/custom-nuget-packaging-pipeline.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ extends:
121121
buildArch: x64
122122
msbuildPlatform: arm64
123123
packageName: arm64
124-
buildparameter: --arm64ec --buildasx --caller_framework WinAI
124+
buildparameter: --arm64 --buildasx --caller_framework WinAI
125125
runTests: false
126126
buildJava: false
127127
buildNodejs: false
@@ -270,6 +270,12 @@ extends:
270270
packagesToPack: '$(Build.BinariesDirectory)/${{ parameters.PackageName }}.nuspec'
271271
packDestination: $(Build.ArtifactStagingDirectory)\
272272

273+
- template: templates/esrp_nuget.yml
274+
parameters:
275+
DisplayName: 'ESRP - sign NuGet package'
276+
FolderPath: '$(Build.ArtifactStagingDirectory)'
277+
DoEsrp: true
278+
273279
- task: 1ES.PublishPipelineArtifact@1
274280
displayName: 'Publish Artifact: Nuget'
275281
inputs:

tools/nuget/generate_nuspec_for_native_nuget.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ def add_common_dependencies(xml_text, package_name, version):
238238
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Gpu.Windows"' + ' version="' + version + '"/>')
239239
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Gpu.Linux"' + ' version="' + version + '"/>')
240240

241+
if package_name == "Microsoft.ML.OnnxRuntime.Foundry":
242+
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Gpu.Linux"' + ' version="' + version + '"/>')
243+
241244

242245
def generate_dependencies(xml_text, package_name, version):
243246
dml_dependency = '<dependency id="Microsoft.AI.DirectML" version="1.15.4"/>'

0 commit comments

Comments
 (0)