forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Subsets.props
252 lines (205 loc) · 15.9 KB
/
Subsets.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<Project>
<!--
This file defines the list of projects to build and divides them into subsets. In ordinary
situations, you should perform a full build by running 'build.cmd' or './build.sh'. This ensures
the projects are sequenced correctly so the outputs and test results are what you would expect.
If you know you only want to run a subset of the build, however, use the Subset property.
Syntax:
(build.cmd/sh) /p:Subset=<desired subset name 1>(-<desired subset name N>)*
- For a description of each subset, use '/p:Subset=help'.
- Subset names are case insensitive.
- 'Subset' is case insensitive. (That is, '/p:subset' works.)
- Order doesn't affect the result.
Examples:
./build.sh /p:Subset=CoreHost
This builds only the .NET Core Host.
./build.sh /p:Subset=CoreHost-Managed
This builds the CoreHost and also the Managed (e.g. Microsoft.Extensions.DependencyModel)
projects. A '-' is the delimiter between multiple subsets to build.
./build.sh -test /p:Subset=Test
This builds and executes the test projects. (The '-test' argument is an Arcade SDK argument
that indicates tests should be run. Otherwise, they'll only be built.)
Quirks:
This command looks useful, but doesn't work as expected:
./build.sh -test /p:Subset=CoreHost-Test # (Doesn't work!)
Intuitively, this should build the host, build the tests, then run the tests on the freshly
built host. What actually happens is the tests run on a previously built host. This is because
the depproj, pkgproj, and installer subsets process the host artifacts, and those didn't
rebuild because those subsets were disabled.
You can get around this limitation by running the corehost subset, manually copying host
artifacts to the test layout, then running the test subset.
-->
<PropertyGroup>
<LibrariesProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries'))</LibrariesProjectRoot>
<CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr'))</CoreClrProjectRoot>
<MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono'))</MonoProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer'))</InstallerProjectRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
</PropertyGroup>
<PropertyGroup>
<DefaultSubsetCategories>libraries-installer-coreclr-mono</DefaultSubsetCategories>
<DefaultSubsetCategories Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android'">libraries-mono</DefaultSubsetCategories>
<DefaultInstallerSubsets>corehost-managed-depproj-pkgproj-bundle-installers-test</DefaultInstallerSubsets>
<!-- TODO: Split into multiple sets. -->
<DefaultLibrariesSubsets>all</DefaultLibrariesSubsets>
<DefaultCoreClrSubsets>runtime-linuxdac-corelib-nativecorelib-tools-packages</DefaultCoreClrSubsets>
<DefaultMonoSubsets>all</DefaultMonoSubsets>
<_subsetCategory Condition="'$(SubsetCategory)' != ''">$(SubsetCategory.ToLowerInvariant())</_subsetCategory>
<_subsetCategory Condition="'$(SubsetCategory)' == ''">$(DefaultSubsetCategories)</_subsetCategory>
<_subset Condition="'$(Subset)' != ''">$(Subset.ToLowerInvariant())</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('installer'))">$(DefaultInstallerSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('libraries'))">$(_subset)-$(DefaultLibrariesSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('coreclr'))">$(_subset)-$(DefaultCoreClrSubsets)</_subset>
<_subset Condition="'$(Subset)' == '' and $(_subsetCategory.Contains('mono'))">$(_subset)-$(DefaultMonoSubsets)</_subset>
<!-- Surround _subset in dashes to simplify checks below -->
<_subset>-$(_subset)-</_subset>
</PropertyGroup>
<PropertyGroup>
<RuntimeFlavor Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and $(_subsetCategory.Contains('mono')) and !$(_subsetCategory.Contains('coreclr'))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">CoreCLR</RuntimeFlavor>
</PropertyGroup>
<ItemGroup>
<!-- Global -->
<SubsetName Include="RegenerateReadmeTable" Category="" OnDemand="true" Description="Regenerates the table of asset links in the README.md file." />
<!-- Libraries -->
<SubsetName Include="All" Category="Libraries" Description="The .NET libraries comprising the shared framework." />
<!-- CoreClr -->
<SubsetName Include="Runtime" Category="CoreClr" Description="The CoreCLR .NET runtime." />
<SubsetName Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="LinuxDac" Category="CoreClr" Description="The cross-OS Windows->libc-based Linux DAC. Skipped on x86." />
<SubsetName Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="AlpineDac" Category="CoreClr" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC. Skipped on x86." />
<SubsetName Include="CoreLib" Category="CoreClr" Description="The managed System.Private.CoreLib library for CoreCLR." />
<SubsetName Include="NativeCoreLib" Category="CoreClr" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." />
<SubsetName Include="Tools" Category="CoreClr" Description="Managed tools that support CoreCLR development and testing." />
<SubsetName Include="Packages" Category="CoreClr" Description="The projects that produce NuGet packages for the CoreCLR runtime, crossgen, and IL tools." />
<!-- Mono -->
<SubsetName Include="All" Category="Mono" Description="The Mono .NET runtime." />
<!-- Installer -->
<SubsetName Include="All" Category="Installer" Description="The .NET Core hosts, hosting libraries, bundles, and installers. Includes these projects' tests." />
<SubsetName Include="CoreHost" Category="Installer" Description="The .NET Core hosts." />
<SubsetName Include="Managed" Category="Installer" Description="The managed .NET hosting projects. This includes PlatformAbstractions, DependencyModel, and HostModel." />
<SubsetName Include="DepProj" Category="Installer" Description="The dependency projects. These gather shared framework files and run crossgen on them to turn them into ready-to-run (R2R) assemblies for the current platform." />
<SubsetName Include="PkgProj" Category="Installer" Description="The packaging projects. These produce NETCoreApp assets: NuGet packages, installers, zips, and Linux packages." />
<SubsetName Include="Bundle" Category="Installer" Description="The shared framework bundle installer projects. Produces .exe installers for Windows." />
<SubsetName Include="Installers" Category="Installer" Description="Generates additional installers. This produces the shared frameworks and their installers." />
<SubsetName Include="Test" Category="Installer" Description="The test projects. Note that building this doesn't execute tests: you must also pass the '-test' argument." />
</ItemGroup>
<!-- Global sets -->
<ItemGroup Condition="$(_subset.Contains('-regeneratereadmetable-'))">
<ProjectToBuild Include="$(RepoToolsLocalDir)regenerate-readme-table.proj" />
</ItemGroup>
<ItemDefinitionGroup Condition="'$(CoreCLRConfiguration)' != ''">
<CoreClrProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrProjectToBuild>
<CoreClrCoreLibProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrCoreLibProjectToBuild>
<CoreClrNativeCoreLibProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrNativeCoreLibProjectToBuild>
<CoreClrManagedToolsProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrManagedToolsProjectToBuild>
<CoreClrPackagesProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrPackagesProjectToBuild>
<CoreClrLinuxDacProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrLinuxDacProjectToBuild>
<CoreClrAlpineLinuxDacProjectToBuild>
<AdditionalProperties>Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrAlpineLinuxDacProjectToBuild>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(MonoConfiguration)' != ''">
<MonoProjectToBuild>
<AdditionalProperties>Configuration=$(MonoConfiguration)</AdditionalProperties>
</MonoProjectToBuild>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(LibrariesConfiguration)' != ''">
<LibrariesProjectToBuild>
<AdditionalProperties>Configuration=$(LibrariesConfiguration)</AdditionalProperties>
</LibrariesProjectToBuild>
</ItemDefinitionGroup>
<!-- CoreClr sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-corelib-'))">
<CoreClrCoreLibProjectToBuild Include="$(CoreClrProjectRoot)src\System.Private.CoreLib\System.Private.CoreLib.csproj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrCoreLibProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-runtime-'))">
<CoreClrProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-linuxdac-')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'">
<CoreClrLinuxDacProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" BuildInParallel="false" AdditionalProperties="%(AdditionalProperties);CrossDac=linux" />
<ProjectToBuild Include="@(CoreClrLinuxDacProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-alpinedac-')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'">
<CoreClrAlpineLinuxDacProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" BuildInParallel="false" AdditionalProperties="%(AdditionalProperties);CrossDac=alpine" />
<ProjectToBuild Include="@(CoreClrAlpineLinuxDacProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-nativecorelib-'))">
<CoreClrNativeCoreLibProjectToBuild Include="$(CoreClrProjectRoot)crossgen-corelib.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrNativeCoreLibProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-tools-'))">
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\runincontext\runincontext.csproj" />
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\r2rdump\R2RDump.csproj" />
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\ReadyToRun.SuperIlc\ReadyToRun.SuperIlc.csproj" />
<CoreClrManagedToolsProjectToBuild Include="$(CoreClrProjectRoot)src\tools\crossgen2\crossgen2\crossgen2.csproj" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrManagedToolsProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('coreclr')) and $(_subset.Contains('-packages-'))">
<CoreClrPackagesProjectToBuild Include="$(CoreClrProjectRoot)src\.nuget\packages.builds" BuildInParallel="false" />
<ProjectToBuild Include="@(CoreClrPackagesProjectToBuild)" />
</ItemGroup>
<!-- Mono sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('mono')) and $(_subset.Contains('-all-'))">
<MonoProjectToBuild Include="$(MonoProjectRoot)mono.proj" BuildInParallel="false" />
<MonoProjectToBuild Include="$(MonoProjectRoot)netcore\System.Private.CoreLib\System.Private.CoreLib.csproj" BuildInParallel="false" />
<ProjectToBuild Include="@(MonoProjectToBuild)" />
</ItemGroup>
<!-- Libraries sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('libraries')) and $(_subset.Contains('-all-'))">
<LibrariesProjectToBuild Include="$(LibrariesProjectRoot)build.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(LibrariesProjectToBuild)" />
</ItemGroup>
<!-- Installer sets -->
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-corehost-'))">
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost\build.proj" SignPhase="Binaries" />
<ProjectToBuild Include="@(CorehostProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-managed-'))">
<ManagedProjectToBuild Include="$(InstallerProjectRoot)managed\**\*.csproj" SignPhase="Binaries" />
<ManagedProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\pack-managed.proj" />
<ProjectToBuild Include="@(ManagedProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-depproj-'))">
<DepprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.depproj" SignPhase="R2RBinaries" BuildInParallel="false" />
<ProjectToBuild Include="@(DepprojProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-pkgproj-'))">
<PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.pkgproj" SignPhase="MsiFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(PkgprojProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-bundle-'))">
<BundleProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.bundleproj" SignPhase="BundleInstallerFiles" BuildInParallel="false" />
<ProjectToBuild Include="@(BundleProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-installers-'))">
<InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\installers.proj" BuildInParallel="false" />
<InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\vs-insertion-packages.proj" BuildInParallel="false" />
<ProjectToBuild Include="@(InstallerProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subsetCategory.Contains('installer')) and $(_subset.Contains('-test-'))">
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.AppHost.Tests\Microsoft.NET.HostModel.AppHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Bundle.Tests\Microsoft.NET.HostModel.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.ComHost.Tests\Microsoft.NET.HostModel.ComHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\HostActivation.Tests\HostActivation.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.DotNet.CoreSetup.Packaging.Tests\Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.csproj" />
<ProjectToBuild Include="@(TestProjectToBuild)" BuildInParallel="false" />
</ItemGroup>
</Project>