@@ -77,8 +77,11 @@ extends:
7777 NuPackScript : |
7878 python -m pip install setuptools
7979 msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} /p:CurrentData=$(BuildDate) /p:CurrentTime=$(BuildTime)
80+ if errorlevel 1 exit /b 1
8081 copy $(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
81- copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
82+ if errorlevel 1 exit /b 1
83+ powershell -Command "$$isRelease = [System.Convert]::ToBoolean('${{ parameters.IsReleaseBuild }}'); $$pkg = Get-ChildItem $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\Microsoft.ML.OnnxRuntime.DirectML.*.nupkg | Where-Object { $$_.Name -notlike '*symbols*' -and (($$isRelease -and $$_.Name -notlike '*-dev*') -or (-not $$isRelease -and $$_.Name -like '*-dev*')) } | Select-Object -First 1; if ($$pkg) { Copy-Item $$pkg.FullName $(Build.ArtifactStagingDirectory) } else { Write-Error 'No matching nupkg found'; exit 1 }"
84+ if errorlevel 1 exit /b 1
8285 mkdir $(Build.ArtifactStagingDirectory)\testdata
8386 copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
8487
@@ -97,9 +100,12 @@ extends:
97100 NuPackScript : |
98101 python -m pip install setuptools
99102 msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=arm64 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
103+ if errorlevel 1 exit /b 1
100104 cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\
101- powershell -Command \"Get-ChildItem Microsoft.ML.OnnxRuntime.DirectML.*.nupkg -ErrorAction Stop | Sort-Object {$_.Name.Length} | Select-Object -First 1 | Rename-Item -NewName win-dml-arm64.zip\"
105+ powershell -Command "$$isRelease = [System.Convert]::ToBoolean('${{ parameters.IsReleaseBuild }}'); $$pkg = Get-ChildItem Microsoft.ML.OnnxRuntime.DirectML.*.nupkg | Where-Object { $$_.Name -notlike '*symbols*' -and (($$isRelease -and $$_.Name -notlike '*-dev*') -or (-not $$isRelease -and $$_.Name -like '*-dev*')) } | Select-Object -First 1; if ($$pkg) { Rename-Item -Path $$pkg.FullName -NewName win-dml-arm64.zip } else { Write-Error 'No matching nupkg found'; exit 1 }"
106+ if errorlevel 1 exit /b 1
102107 copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\win-dml-arm64.zip $(Build.ArtifactStagingDirectory)
108+ if errorlevel 1 exit /b 1
103109 mkdir $(Build.ArtifactStagingDirectory)\testdata
104110 copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
105111
0 commit comments