Skip to content

Commit 8272a32

Browse files
committed
The -test command for windows. Nuget packages (dotnet#5464)
* working on testing * testing updates * tests almost working * build changes * all tests should be working * changes from PR comments * fixes for .net 3.1 * Fixed extension check. Removed <PackageId> where not needed * Removed pkg folder and updated paths.
1 parent 5c2f260 commit 8272a32

File tree

106 files changed

+591
-732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+591
-732
lines changed

Directory.Build.props

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313

1414
<PropertyGroup>
1515
<Copyright>$(CopyrightNetFoundation)</Copyright>
16-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1716
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
18-
<DebugType>embedded</DebugType>
17+
<DebugType>portable</DebugType>
1918
<DebugSymbols>true</DebugSymbols>
2019
<LangVersion>latest</LangVersion>
2120
</PropertyGroup>
@@ -31,7 +30,7 @@
3130
</PropertyGroup>
3231

3332
<PropertyGroup>
34-
<PackageAssetsPath>$(ArtifactsDir)/pkgassets/</PackageAssetsPath>
33+
<PackageAssetsPath>$(ArtifactsDir)pkgassets/</PackageAssetsPath>
3534
<PkgDir>$(RepoRoot)pkg/</PkgDir>
3635
</PropertyGroup>
3736

@@ -49,17 +48,17 @@
4948
<PropertyGroup>
5049
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
5150
<PublishRepositoryUrl>true</PublishRepositoryUrl>
52-
51+
5352
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
5453
<EmbedUntrackedSources>true</EmbedUntrackedSources>
55-
54+
5655
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
5756
<IncludeSymbols>true</IncludeSymbols>
5857
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
5958
</PropertyGroup>
60-
59+
6160
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
62-
<!--
61+
<!--
6362
When building using source-build the process is:
6463
- Newtonsoft.Json versions 9.0.1 and 12.0.2 are built by source-build
6564
- Version 12.0.2 is written to Version.props

Directory.Build.targets

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,39 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4+
5+
<Target Name="CopyNativeAssembiles" AfterTargets="CopyFilesToOutputDirectory">
6+
<PropertyGroup>
7+
<LibPrefix Condition="'$(OS)' != 'Windows_NT'">lib</LibPrefix>
8+
<LibExtension Condition="'$(OS)' == 'Windows_NT'">.dll</LibExtension>
9+
<LibExtension Condition="'$(OS)' != 'Windows_NT'">.so</LibExtension>
10+
<LibExtension Condition="$([MSBuild]::IsOSPlatform('osx'))">.dylib</LibExtension>
11+
12+
<TargetArchitecture Condition="'$(Platform)' == ''">x64</TargetArchitecture>
13+
<NativeTargetArchitecture Condition="'$(NativeTargetArchitecture)' == ''">$(TargetArchitecture)</NativeTargetArchitecture>
14+
<BinDir Condition="'$(BinDir)'==''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin'))</BinDir>
15+
<NativeOutputPath>$(BinDir)Native\$(NativeTargetArchitecture).$(Configuration)\</NativeOutputPath>
16+
17+
<Platform Condition="'$(Platform)'==''">AnyCPU</Platform>
18+
<PlatformConfig>$(Platform).$(Configuration)</PlatformConfig>
19+
<OutputPath Condition="'$(OutputPath)'==''">$(BinDir)$(MSBuildProjectName)\Debug</OutputPath>
20+
</PropertyGroup>
21+
22+
<ItemGroup>
23+
<NativeAssemblyReference>
24+
<FullAssemblyPath>$(NativeOutputPath)$(LibPrefix)%(NativeAssemblyReference.Identity)$(LibExtension)</FullAssemblyPath>
25+
</NativeAssemblyReference>
26+
</ItemGroup>
27+
28+
<Copy SourceFiles = "@(NativeAssemblyReference->'%(FullAssemblyPath)')"
29+
DestinationFolder="$(OutDir)"
30+
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
31+
Retries="$(CopyRetryCount)"
32+
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
33+
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
34+
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
35+
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
36+
</Copy>
37+
</Target>
38+
439
</Project>

Microsoft.ML.sln

Lines changed: 84 additions & 44 deletions
Large diffs are not rendered by default.

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
1010
done
1111
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
1212

13-
"$DIR/eng/common/build.sh" --restore --build --pack --warnAsError false
13+
"$DIR/eng/common/build.sh" --restore --build --pack --warnAsError false "$@"

docs/samples/Microsoft.ML.AutoML.Samples/Microsoft.ML.AutoML.Samples.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
<ItemGroup>
99
<ProjectReference Include="..\..\..\src\Microsoft.ML.AutoML\Microsoft.ML.AutoML.csproj" />
10+
<ProjectReference Include="..\..\..\src\Microsoft.ML.Core\Microsoft.ML.Core.csproj" >
11+
<PrivateAssets>all</PrivateAssets>
12+
</ProjectReference>
13+
14+
<ProjectReference Include="..\..\..\src\Microsoft.ML.Transforms\Microsoft.ML.Transforms.csproj" >
15+
<PrivateAssets>all</PrivateAssets>
16+
</ProjectReference>
17+
1018
<NativeAssemblyReference Include="MatrixFactorizationNative" />
1119
<NativeAssemblyReference Include="FastTreeNative" />
1220
</ItemGroup>

docs/samples/Microsoft.ML.Samples.GPU/Microsoft.ML.Samples.GPU.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@
2020

2121
<ItemGroup>
2222
<ProjectReference Include="..\..\..\src\Microsoft.ML.Vision\Microsoft.ML.Vision.csproj" />
23+
<ProjectReference Include="..\..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
24+
<ProjectReference Include="..\..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
2325
<ProjectReference Include="..\..\..\src\Microsoft.ML.LightGbm\Microsoft.ML.LightGbm.csproj" />
2426
<ProjectReference Include="..\..\..\src\Microsoft.ML.TensorFlow\Microsoft.ML.TensorFlow.csproj" />
2527
<ProjectReference Include="..\..\..\src\Microsoft.ML.SamplesUtils\Microsoft.ML.SamplesUtils.csproj" />
28+
<ProjectReference Include="..\..\..\src\Microsoft.ML.StandardTrainers\Microsoft.ML.StandardTrainers.csproj" />
29+
<ProjectReference Include="..\..\..\src\Microsoft.ML.Transforms\Microsoft.ML.Transforms.csproj" />
2630

2731
<NativeAssemblyReference Include="CpuMathNative" />
2832
<NativeAssemblyReference Include="FastTreeNative" />

docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
<ProjectReference Include="..\..\..\src\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj" />
3131
<ProjectReference Include="..\..\..\src\Microsoft.ML.Transforms\Microsoft.ML.Transforms.csproj" />
3232
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxConverter\Microsoft.ML.OnnxConverter.csproj" />
33+
<ProjectReference Include="..\..\..\src\Microsoft.ML.ImageAnalytics\Microsoft.ML.ImageAnalytics.csproj" />
34+
<ProjectReference Include="..\..\..\src\Microsoft.ML.Core\Microsoft.ML.Core.csproj" />
35+
<ProjectReference Include="..\..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
3336

3437
<NativeAssemblyReference Include="CpuMathNative" />
3538
<NativeAssemblyReference Include="FastTreeNative" />

eng/Build.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
3+
4+
<ItemDefinitionGroup>
5+
<ProjectToBuild>
6+
<RestoreInParallel>true</RestoreInParallel>
7+
<BuildInParallel>false</BuildInParallel>
8+
</ProjectToBuild>
9+
</ItemDefinitionGroup>
10+
311
<ItemGroup>
412
<ProjectToBuild Include="$(RepoRoot)src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj" />
513
<ProjectToBuild Include="$(RepoRoot)src/Native/Native.proj" />
614
<ProjectToBuild Include="$(RepoRoot)Microsoft.ML.sln" />
715
</ItemGroup>
16+
817
</Project>

eng/Versions.props

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<Project>
33
<PropertyGroup>
44
<!-- This repo version -->
5-
<DotNetUseShippingVersions>true</DotNetUseShippingVersions>
5+
<DotNetUseShippingVersions>false</DotNetUseShippingVersions>
66
<VersionPrefix>1.5.3</VersionPrefix>
7-
<PreReleaseVersionLabel></PreReleaseVersionLabel>
7+
<PreReleaseVersionLabel>dev</PreReleaseVersionLabel>
88

99
<!--ML.NET Core dependencies-->
1010
<NewtonsoftJsonPackageVersion>10.0.3</NewtonsoftJsonPackageVersion>
@@ -37,7 +37,7 @@
3737
<ReportGeneratorVersion>4.3.6</ReportGeneratorVersion>
3838
<MicrosoftDotNetApiCompatPackageVersion>1.0.0-beta.19225.5</MicrosoftDotNetApiCompatPackageVersion>
3939
<MicrosoftSourceLinkVersion>1.1.0-beta-20206-02</MicrosoftSourceLinkVersion>
40-
40+
4141
<!-- Test-only Dependencies -->
4242
<BenchmarkDotNetVersion>0.12.0</BenchmarkDotNetVersion>
4343
<MicrosoftCodeAnalysisTestingVersion>1.0.1-beta1.20080.1</MicrosoftCodeAnalysisTestingVersion>
@@ -77,6 +77,7 @@
7777
<MicrosoftExtensionsDependencyModelVersion>2.1.0</MicrosoftExtensionsDependencyModelVersion>
7878
<MicrosoftExtensionsFileSystemGlobbingVersion>2.0.0</MicrosoftExtensionsFileSystemGlobbingVersion>
7979
<MicrosoftNETCorePlatformsVersion>2.1.0</MicrosoftNETCorePlatformsVersion>
80+
<MicrosoftNETCore3PlatformsVersion>3.1.0</MicrosoftNETCore3PlatformsVersion>
8081
<MicrosoftNetCompilersToolsetVersion>3.8.0-3.20460.2</MicrosoftNetCompilersToolsetVersion>
8182
<MoqVersion>4.8.3</MoqVersion>
8283
<MonoOptionsVersion>5.3.0.1</MonoOptionsVersion>
@@ -103,9 +104,9 @@
103104
<SystemThreadingTasksExtensionVersion>4.5.2</SystemThreadingTasksExtensionVersion>
104105
<SystemValueTupleVersion>4.4.0</SystemValueTupleVersion>
105106
<WindowsAzureStorageVersion>8.5.0</WindowsAzureStorageVersion>
106-
<XUnitVersion>2.4.1</XUnitVersion>
107+
<XUnitVersion>2.4.0</XUnitVersion>
107108
<XUnitAbstractionsVersion>2.0.3</XUnitAbstractionsVersion>
108-
<XUnitVSRunnerVersion>2.4.1</XUnitVSRunnerVersion>
109+
<XUnitVSRunnerVersion>2.4.0</XUnitVSRunnerVersion>
109110
<MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20461.7</MicrosoftDotNetBuildTasksFeedVersion>
110111
<MicrosoftDotNetSignToolVersion>5.0.0-beta.20461.7</MicrosoftDotNetSignToolVersion>
111112
<MicrosoftAzureDocumentDBVersion>1.22.0</MicrosoftAzureDocumentDBVersion>
File renamed without changes.

0 commit comments

Comments
 (0)