From e4e3c6c9cdd0a75fc85961b541d479cd68af2bd9 Mon Sep 17 00:00:00 2001 From: Ryan Lai Date: Wed, 13 May 2020 15:44:28 -0700 Subject: [PATCH 1/3] Fix DirectML nuget creation in Nuget pipeline --- tools/nuget/generate_nuspec_for_native_nuget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nuget/generate_nuspec_for_native_nuget.py b/tools/nuget/generate_nuspec_for_native_nuget.py index b3f45b9a8d411..de9e7ef2c4830 100644 --- a/tools/nuget/generate_nuspec_for_native_nuget.py +++ b/tools/nuget/generate_nuspec_for_native_nuget.py @@ -150,7 +150,7 @@ def generate_files(list, args): if includes_directml: files_list.append('') files_list.append('') - files_list.append('') + files_list.append('') if includes_winml: # Process microsoft.ai.machinelearning import lib, dll, and pdb From f5777b97cbe6a8e5790c7afa2f68312f95d2bb36 Mon Sep 17 00:00:00 2001 From: Ryan Lai Date: Thu, 14 May 2020 15:52:29 -0700 Subject: [PATCH 2/3] DirectML Nuget package has different timestamp --- .../get-nuget-package-version-as-variable.yml | 13 +++++++++++++ .../github/azure-pipelines/nuget/templates/gpu.yml | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/get-nuget-package-version-as-variable.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/get-nuget-package-version-as-variable.yml index c5faef7108f9c..d294e218182cb 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/get-nuget-package-version-as-variable.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/get-nuget-package-version-as-variable.yml @@ -15,6 +15,19 @@ steps: @echo ortversion is !ortversion! @echo ##vso[task.setvariable variable=NuGetPackageVersionNumber;]!ortversion! ) +- task: CmdLine@2 + condition: eq(variables['Agent.OS'], 'Windows_NT') + displayName: 'Extract version number from the DirectML NuPkg file, Windows VMs' + inputs: + workingDirectory: '${{ parameters.packageFolder }}' + script: | + SETLOCAL EnableDelayedExpansion + FOR /R %%i IN (Microsoft.ML.OnnxRuntime.DirectML*.nupkg) do ( + set filename=%%~ni + set ortversion=!filename:~33! + @echo DirectMLNuGetPackageVersionNumber is !ortversion! + @echo ##vso[task.setvariable variable=DirectMLNuGetPackageVersionNumber;]!ortversion! + ) - task: CmdLine@2 condition: not(eq(variables['Agent.OS'], 'Windows_NT')) displayName: 'Extract version number from the NuPkg file, Unix VMs' diff --git a/tools/ci_build/github/azure-pipelines/nuget/templates/gpu.yml b/tools/ci_build/github/azure-pipelines/nuget/templates/gpu.yml index 36b506fbc08a9..233d40c16acf9 100644 --- a/tools/ci_build/github/azure-pipelines/nuget/templates/gpu.yml +++ b/tools/ci_build/github/azure-pipelines/nuget/templates/gpu.yml @@ -280,7 +280,7 @@ jobs: condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme inputs: command: 'push' - searchPatternPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.DirectML.$(NuGetPackageVersionNumber).nupkg' + searchPatternPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.DirectML.$(DirectMLNuGetPackageVersionNumber).nupkg' feedPublish: 'OnnxRuntime' - task: NuGetCommand@2 @@ -304,5 +304,5 @@ jobs: condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme inputs: command: 'push' - packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.DirectML.$(NuGetPackageVersionNumber).nupkg' + packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.DirectML.$(DirectMLNuGetPackageVersionNumber).nupkg' publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7' \ No newline at end of file From 26dde7e378451cc81e3b2476192be17212ec65dc Mon Sep 17 00:00:00 2001 From: Ryan Lai Date: Thu, 14 May 2020 15:54:00 -0700 Subject: [PATCH 3/3] remove accidentally changed file --- tools/nuget/generate_nuspec_for_native_nuget.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tools/nuget/generate_nuspec_for_native_nuget.py b/tools/nuget/generate_nuspec_for_native_nuget.py index 8c75496a50959..5bd6b100565d4 100644 --- a/tools/nuget/generate_nuspec_for_native_nuget.py +++ b/tools/nuget/generate_nuspec_for_native_nuget.py @@ -192,18 +192,12 @@ def generate_files(list, args): '" target="runtimes\\win-' + args.target_architecture + '\\native" />') if includes_directml: -<<<<<<< HEAD - files_list.append('') - files_list.append('') - files_list.append('') -======= files_list.append('') files_list.append('') files_list.append('') ->>>>>>> origin/master if includes_winml: # Process microsoft.ai.machinelearning import lib, dll, and pdb