Skip to content

Commit

Permalink
Test2
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer committed Nov 25, 2024
1 parent 6d4ad9d commit e980b37
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 40 deletions.
29 changes: 3 additions & 26 deletions eng/Build.props
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
<Project>

<Import Project="$(MSBuildThisFileDirectory)Common.props" />
<Import Project="$(MSBuildThisFileDirectory)Build\Directory.Build.props" />

<Choose>
<!-- Project selection can be overridden on the command line by passing in -projects. -->
<When Condition="'$(ProjectToBuild)' != ''">
<ItemGroup>
<ProjectToBuild Include="$(ProjectToBuild)"
Exclude="@(ProjectToExclude);$(RepoRoot)**\bin\**\*;$(RepoRoot)**\obj\**\*">
<BuildInParallel Condition=" '%(Extension)' == '.nodeproj' OR '%(Extension)' == '.vcxproj' ">false</BuildInParallel>
<RestoreInParallel Condition=" '%(Extension)' == '.nodeproj' ">false</RestoreInParallel>
<!-- Also do not build in parallel w/in npm projects. -->
<AdditionalProperties Condition=" '%(Extension)' == '.nodeproj' OR '%(Extension)' == '.vcxproj' ">BuildInParallel=false</AdditionalProperties>
</ProjectToBuild>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Build\Native.Traversal.proj" Condition="'$(BuildNative)' == 'true'" BuildInParallel="false" />
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Build\NodeJS.Traversal.proj" Condition="'$(BuildNodeJS)' == 'true'" BuildInParallel="false" />
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Build\Java.Traversal.proj" Condition="'$(BuildJava)' == 'true'" BuildInParallel="false" />
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Build\Managed.Traversal.proj" Condition="'$(BuildManaged)' == 'true'" BuildInParallel="false" />
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Build\Installers.Traversal.proj" Condition="'$(BuildInstallers)' == 'true'" BuildInParallel="false" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Build\Build.Traversal.proj" />
</ItemGroup>

</Project>
24 changes: 24 additions & 0 deletions eng/Build/Build.Traversal.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.Build.Traversal">

<Choose>
<!-- Project selection can be overridden on the command line by passing in -projects. -->
<When Condition="'$(ProjectToBuild)' != ''">
<ItemGroup>
<ProjectReference Include="$(ProjectToBuild)"
Exclude="@(ProjectToExclude);$(RepoRoot)**\bin\**\*;$(RepoRoot)**\obj\**\*">
<BuildInParallel Condition=" '%(Extension)' == '.nodeproj' OR '%(Extension)' == '.vcxproj' ">false</BuildInParallel>
</ProjectReference>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<ProjectReference Include="Native.Traversal.proj" Condition="'$(BuildNative)' == 'true'" BuildInParallel="false" />
<ProjectReference Include="NodeJS.Traversal.proj" Condition="'$(BuildNodeJS)' == 'true'" BuildInParallel="false" />
<ProjectReference Include="Java.Traversal.proj" Condition="'$(BuildJava)' == 'true'" BuildInParallel="false" />
<ProjectReference Include="Managed.Traversal.proj" Condition="'$(BuildManaged)' == 'true'" BuildInParallel="false" />
<ProjectReference Include="Installers.Traversal.proj" Condition="'$(BuildInstallers)' == 'true'" BuildInParallel="false" />
</ItemGroup>
</Otherwise>
</Choose>

</Project>
23 changes: 23 additions & 0 deletions eng/Build/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets, $(MSBuildThisFileDirectory)..))" />

<Target Name="GetReferencesProvided" Returns="@(ProvidesReferenceOrRequiresDelay)">
<MSBuild Projects="@(ProjectReference);@(ExplicitRequiresDelay)"
Targets="GetReferencesProvided"
BuildInParallel="true"
SkipNonexistentTargets="true">
<Output TaskParameter="TargetOutputs" ItemName="ProvidesReferenceOrRequiresDelay" />
</MSBuild>
</Target>

<Target Name="CreateHelixPayload" Returns="@(HelixWorkItem)">
<MSBuild Projects="@(ProjectReference)"
Targets="CreateHelixPayload"
BuildInParallel="true"
SkipNonexistentTargets="true">
<Output TaskParameter="TargetOutputs" ItemName="HelixWorkItem" />
</MSBuild>
</Target>

</Project>
8 changes: 0 additions & 8 deletions eng/Build/Managed.Traversal.proj
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,4 @@
Condition=" '$(BuildMainlyReferenceProviders)' == 'true' " />
</ItemGroup>

<Target Name="GetReferencesProvided" Returns="@(ProvidesReferenceOrRequiresDelay)">
<MSBuild Projects="@(ProjectReference);@(ExplicitRequiresDelay)"
Targets="GetReferencesProvided"
BuildInParallel="true">
<Output TaskParameter="TargetOutputs" ItemName="ProvidesReferenceOrRequiresDelay" />
</MSBuild>
</Target>

</Project>
1 change: 0 additions & 1 deletion eng/Build/NodeJS.Traversal.proj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<ProjectReference
Include="$(RepoRoot)eng\Npm.Workspace.nodeproj;
$(RepoRoot)eng\Npm.Workspace.FunctionalTests.nodeproj"
RestoreInParallel="false"
BuildInParallel="false"
Exclude="@(ProjectToExclude)" />
</ItemGroup>
Expand Down
8 changes: 3 additions & 5 deletions eng/helix/helix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<Import Project="..\targets\Helix.Common.props" />
<Import Project="..\Build.props" />
<Import Project="..\Common.props" />
<Import Project="..\Versions.props" />

<!-- Microsoft.DotNet.Helix.Sdk.MultiQueue.targets splits $(HelixTargetQueues) into @(HelixTargetQueue) items. -->
Expand Down Expand Up @@ -165,10 +165,8 @@

<!-- In inner (per-queue) builds, Publish the test projects and create work items. -->
<Target Name="Gather" BeforeTargets="BeforeTest" Condition=" '$(HelixTargetQueue)' != '' ">
<MSBuild Projects="@(ProjectToBuild)"
BuildInParallel="%(ProjectToBuild.BuildInParallel)"
Targets="CreateHelixPayload"
SkipNonexistentTargets="true">
<MSBuild Projects="..\Build\Build.Traversal.proj"
Targets="CreateHelixPayload">
<Output TaskParameter="TargetOutputs" ItemName="HelixWorkItem" />
</MSBuild>
</Target>
Expand Down

0 comments on commit e980b37

Please sign in to comment.