Fix nuget build (#5163)

* Fix nuget content

* Revert "Fix nuget content"

This reverts commit e2cdcec4e39964c50eac2fb306c7a4bb84352443.

* Nuget packaging

* skip tests

* msbuild path

* Force msbuild version

* Workaround https://github.com/NuGet/Home/issues/7621

* cleanup
This commit is contained in:
Tiago Koji Castro Shibata 2020-09-16 10:37:09 -07:00 committed by GitHub
parent e6f85f338e
commit 1a2e289d2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 35 additions and 39 deletions

View file

@ -32,11 +32,7 @@
<MLBinaries>$(WindowsAIBinary);$(OnnxRuntimeBinary)</MLBinaries>
</PropertyGroup>
<Target Name="CopyMLBinaries" BeforeTargets="Build">
<PropertyGroup>
<WindowsAIBinplaceMessage>Binplacing WindowsAI binaries: {0} and {1}.</WindowsAIBinplaceMessage>
</PropertyGroup>
<Message Text="$([System.String]::Format('$(WindowsAIBinplaceMessage)', '$(WindowsAIBinary)', '$(OnnxRuntimeBinary)'))" />
<Copy SkipUnchangedFiles="True" SourceFiles="$(MLBinaries)" DestinationFolder="$(OutDir)" />
</Target>
<ItemGroup>
<ReferenceCopyLocalPaths Include="$(MLBinaries)" />
</ItemGroup>
</Project>

View file

@ -17,7 +17,7 @@
#include <PathCch.h>
#pragma comment(lib, "PathCch.lib")
// Desktop apps need to support back to Windows 7, so we can't use PathCch.lib as it was added in Windows 8
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#elif WINVER < _WIN32_WINNT_WIN8
#include <shlwapi.h>
#pragma comment(lib, "Shlwapi.lib")
#else
@ -37,7 +37,7 @@ namespace {
Status RemoveFileSpec(PWSTR pszPath, size_t cchPath) {
assert(pszPath != nullptr && pszPath[0] != L'\0');
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(USE_PATHCCH_LIB)
#if WINVER < _WIN32_WINNT_WIN8 && !defined(USE_PATHCCH_LIB)
(void)cchPath;
for (PWSTR t = L"\0"; *t == L'\0'; t = PathRemoveBackslashW(pszPath))
;

View file

@ -27,9 +27,9 @@ jobs:
architecture: x64
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: BatchScript@1
displayName: 'setup env'

View file

@ -139,13 +139,13 @@ jobs:
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-arm'
- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact - NuGet DirectML x64 Store'
displayName: 'Download Pipeline Artifact - NuGet CPU x64 Store'
inputs:
artifactName: 'Microsoft.AI.MachineLearning.x64.Store'
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-x64-store'
- task: DownloadPipelineArtifact@0
displayName: 'Download Pipeline Artifact - NuGet DirectML x86 Store'
displayName: 'Download Pipeline Artifact - NuGet CPU x86 Store'
inputs:
artifactName: 'Microsoft.AI.MachineLearning.x86.Store'
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-x86-store'
@ -392,13 +392,13 @@ jobs:
displayName: 'Setup VS2019 env vars'
inputs:
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat'
arguments: 'amd64'
arguments: x64
modifyEnvironment: true
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: PowerShell@2
displayName: 'NuGet Tests: Restore Windows.AI.MachineLearning Nuget Package (CppWinRT)'

View file

@ -131,9 +131,9 @@ jobs:
- ${{ if eq(parameters.BuildCSharp, true) }}:
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- ${{ if eq(parameters.BuildCSharp, true) }}:
- task: DotNetCoreCLI@2

View file

@ -5,9 +5,9 @@ parameters:
DoDataDownload: true
steps:
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
# - task: UniversalPackages@0
# displayName: 'Download python'
# inputs:

View file

@ -148,10 +148,11 @@ steps:
copy $(Build.SourcesDirectory)\onnxruntime\test\testdata\sequence_length.onnx $(Build.ArtifactStagingDirectory)\test_artifact\
copy $(Build.SourcesDirectory)\onnxruntime\test\testdata\sequence_construct.onnx $(Build.ArtifactStagingDirectory)\test_artifact\
displayName: 'Copy WinML test collateral to artifact directory'
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: BatchScript@1
displayName: 'Setup VS2019 env vars'

View file

@ -53,9 +53,9 @@ jobs:
displayName: 'Install ONNX'
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: NuGetCommand@2
displayName: 'NuGet restore'
@ -230,9 +230,9 @@ jobs:
- template: templates/set-test-data-variables-step.yml
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: DotNetCoreCLI@2
@ -369,9 +369,9 @@ jobs:
- template: templates/set-test-data-variables-step.yml
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: DotNetCoreCLI@2
displayName: 'Restore nuget packages'
@ -497,9 +497,9 @@ jobs:
- template: templates/set-test-data-variables-step.yml
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: DotNetCoreCLI@2

View file

@ -78,9 +78,9 @@ jobs:
- template: templates/set-test-data-variables-step.yml
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: DotNetCoreCLI@2
displayName: 'Restore nuget packages'

View file

@ -77,9 +77,9 @@ jobs:
- template: templates/set-test-data-variables-step.yml
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: DotNetCoreCLI@2
displayName: 'Restore nuget packages'

View file

@ -77,9 +77,9 @@ jobs:
- template: templates/set-test-data-variables-step.yml
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: DotNetCoreCLI@2
displayName: 'Restore nuget packages'

View file

@ -77,9 +77,9 @@ jobs:
- template: templates/set-test-data-variables-step.yml
- task: NuGetToolInstaller@0
displayName: Use Nuget 4.9
displayName: Use Nuget 5.7.0
inputs:
versionSpec: 4.9.4
versionSpec: 5.7.0
- task: DotNetCoreCLI@2
@ -116,4 +116,3 @@ jobs:
condition : 'succeeded'
- template: templates/clean-agent-build-directory-step.yml