Skip to content
This repository was archived by the owner on Mar 20, 2019. It is now read-only.

Commit b5df112

Browse files
committed
Split out samples and doc building so they can be parallelized.
1 parent d42378e commit b5df112

4 files changed

Lines changed: 46 additions & 25 deletions

File tree

build.proj

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<Import Project="$(MSBuildProjectDirectory)\tools\DotNetOpenAuth.automated.props"/>
3-
<PropertyGroup>
4-
</PropertyGroup>
5-
6-
<Import Project="$(ProjectRoot)tools\Documentation.targets"/>
73
<Import Project="$(ProjectRoot)tools\Publish.targets"/>
84
<Import Project="$(ProjectRoot)tools\Translation.targets"/>
95

106
<ItemGroup>
11-
<SampleProjects Include="$(ProjectRoot)samples\**\*.csproj;$(ProjectRoot)samples\**\*.vbproj" />
12-
<SampleSites Include="OAuthConsumer;OAuthServiceProvider;InfoCardRelyingParty" />
137
<ProjectsToClean Include="
148
$(SolutionPath);
159
vsi\vsi.proj;
@@ -38,23 +32,10 @@
3832
<RemoveDir Directories="@(DirtyDirectories)" />
3933
</Target>
4034

41-
<Target Name="SkipVerification" Condition="'$(IsElevated)' == 'true'">
42-
<SignatureVerification SkipVerification="true" AssemblyName="*" PublicKeyToken="$(PublicKeyToken)" />
43-
</Target>
44-
45-
<Target Name="BuildProduct" DependsOnTargets="SkipVerification">
46-
<MSBuild Projects="$(ProjectRoot)src\$(ProductName)\$(ProductName).csproj" BuildInParallel="$(BuildInParallel)" />
47-
</Target>
48-
4935
<Target Name="BuildTests" DependsOnTargets="SkipVerification">
5036
<MSBuild Projects="$(SolutionPath)" Targets="DotNetOpenAuth_Test;DotNetOpenAuth_TestWeb" BuildInParallel="$(BuildInParallel)" />
5137
</Target>
5238

53-
<Target Name="BuildSamples" DependsOnTargets="SkipVerification">
54-
<MSBuild Projects="@(SampleProjects)" BuildInParallel="$(BuildInParallel)" />
55-
<MSBuild Projects="$(SolutionPath)" Targets="@(SampleSites)" BuildInParallel="$(BuildInParallel)" />
56-
</Target>
57-
5839
<Target Name="Build" DependsOnTargets="SkipVerification">
5940
<MSBuild Projects="$(SolutionPath)" BuildInParallel="$(BuildInParallel)" />
6041
</Target>
@@ -110,9 +91,6 @@
11091
ZipLevel="$(ZipLevel)" />
11192
</Target>
11293

113-
<Target Name="Documentation" DependsOnTargets="BuildProduct;Chm" Condition="'$(NoDocumentation)' != 'true'">
114-
</Target>
115-
11694
<Target Name="Test" DependsOnTargets="BuildTests"
11795
Inputs="$(OutputPath)$(ProductName).Test.dll"
11896
Outputs='$(OutputPath)Test-result.xml'>
@@ -126,7 +104,16 @@
126104
ExcludeCategory="$(NUnitExcludeCategories)"/>
127105
</Target>
128106

129-
<Target Name="DropLayout" DependsOnTargets="BuildUnifiedProduct;ReSignDelaySignedAssemblies;BuildSamples;vsi;vsix;Documentation">
107+
<Target Name="DropLayout" DependsOnTargets="BuildUnifiedProduct;ReSignDelaySignedAssemblies">
108+
<!-- Note that we use an MSBuild task for these dependencies rather than individual DependsOnTargets entries
109+
so that these builds can be executed in parallel. -->
110+
<MSBuild BuildInParallel="$(BuildInParallel)"
111+
Projects="
112+
samples\samples.proj;
113+
vsi\vsi.proj;
114+
vsix\vsix.proj;
115+
doc\doc.proj;
116+
" />
130117
<PropertyGroup>
131118
<DropBinDirectory>$(DropDirectory)Bin\</DropBinDirectory>
132119
<DropLibDirectory>$(DropDirectory)Lib\</DropLibDirectory>
@@ -251,5 +238,5 @@
251238

252239
</Target>
253240

254-
<Import Project="$(ProjectRoot)DotNetOpenAuth.automated.targets"/>
241+
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
255242
</Project>

doc/doc.proj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildProjectDirectory)\..\tools\DotNetOpenAuth.automated.props"/>
4+
5+
<Target Name="Build" DependsOnTargets="BuildProduct;Chm" Condition=" '$(NoDocumentation)' != 'true' " />
6+
7+
<Import Project="$(ProjectRoot)tools\Documentation.targets"/>
8+
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
9+
</Project>

samples/Samples.proj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildProjectDirectory)\..\tools\DotNetOpenAuth.automated.props"/>
4+
5+
<ItemGroup>
6+
<SampleProjects Include="**\*.csproj;**\*.vbproj" />
7+
<SampleSites Include="OAuthConsumer;OAuthServiceProvider;InfoCardRelyingParty" />
8+
</ItemGroup>
9+
10+
<Target Name="Build" DependsOnTargets="SkipVerification">
11+
<MSBuild Projects="@(SampleProjects)" BuildInParallel="$(BuildInParallel)" />
12+
<MSBuild Projects="$(SolutionPath)" Targets="@(SampleSites)" BuildInParallel="$(BuildInParallel)" />
13+
</Target>
14+
15+
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
16+
</Project>

tools/DotNetOpenAuth.automated.targets

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@
2121
</PropertyGroup>
2222
</Target>
2323

24-
<Target Name="BuildUnifiedProduct">
24+
<Target Name="SkipVerification" Condition="'$(IsElevated)' == 'true'">
25+
<SignatureVerification SkipVerification="true" AssemblyName="*" PublicKeyToken="$(PublicKeyToken)" />
26+
</Target>
27+
28+
<Target Name="BuildProduct" DependsOnTargets="SkipVerification">
29+
<MSBuild BuildInParallel="$(BuildInParallel)"
30+
Projects="$(ProjectRoot)src\$(ProductName)\$(ProductName).csproj" />
31+
</Target>
32+
33+
<Target Name="BuildUnifiedProduct" DependsOnTargets="BuildProduct">
2534
<MSBuild BuildInParallel="$(BuildInParallel)"
2635
Projects="$(ProjectRoot)src\$(ProductName)\$(ProductName).csproj"
2736
Targets="BuildUnifiedProduct" />

0 commit comments

Comments
 (0)