-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildAll.proj
168 lines (146 loc) · 10.6 KB
/
buildAll.proj
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="RebuildAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="properties\service_fabric_managed_prod.props" />
<PropertyGroup>
<CurrentDir>$(MSBuildThisFileDirectory)</CurrentDir>
<NuGetExePath Condition="'$(NuGetExePath)' == ''">$(CurrentDir)\external\nuget.exe</NuGetExePath>
<RequestedVerbosity Condition=" '$(RequestedVerbosity)' == '' ">normal</RequestedVerbosity>
<DropFolder>$(CurrentDir)drop\$(Configuration)</DropFolder>
<NugetPackageDropFolder>$(DropFolder)\packages</NugetPackageDropFolder>
</PropertyGroup>
<ItemGroup>
<!-- List of .csproj to build -->
<ProjectsToBuild Include="src\FabActUtil\FabActUtil.csproj;
src\Microsoft.ServiceFabric.Actors\Microsoft.ServiceFabric.Actors.csproj;
src\Microsoft.ServiceFabric.Actors.Wcf\Microsoft.ServiceFabric.Actors.Wcf.csproj;
src\Microsoft.ServiceFabric.Services\Microsoft.ServiceFabric.Services.csproj;
src\Microsoft.ServiceFabric.Services.Remoting\Microsoft.ServiceFabric.Services.Remoting.csproj;
src\Microsoft.ServiceFabric.Services.Wcf\\Microsoft.ServiceFabric.Services.Wcf.csproj" />
<ProjectsToBuildIncludingTests Include="@(ProjectsToBuild);
test\unittests\Microsoft.ServiceFabric.Actors.Tests\Microsoft.ServiceFabric.Actors.Tests.csproj;
test\unittests\Microsoft.ServiceFabric.Services.Remoting.Tests\Microsoft.ServiceFabric.Services.Remoting.Tests.csproj;
test\unittests\Microsoft.ServiceFabric.Services.Tests\Microsoft.ServiceFabric.Services.Tests.csproj" />
<!-- List of .nuproj to build to generate nuget packages -->
<NuprojsToBuild Include="nuprojs\Microsoft.ServiceFabric.Actors\Microsoft.ServiceFabric.Actors.nuproj;
nuprojs\Microsoft.ServiceFabric.Actors.Wcf\Microsoft.ServiceFabric.Actors.Wcf.nuproj;
nuprojs\Microsoft.ServiceFabric.Services\Microsoft.ServiceFabric.Services.nuproj;
nuprojs\Microsoft.ServiceFabric.Services.Remoting\Microsoft.ServiceFabric.Services.Remoting.nuproj;
nuprojs\Microsoft.ServiceFabric.Services.Wcf\\Microsoft.ServiceFabric.Services.Wcf.nuproj"/>
<!-- List of packages.config to restore nuget packages -->
<PackagesConfigs Include="nuprojs\packages.config;
src\Microsoft.ServiceFabric.Actors\packages.config;
src\Microsoft.ServiceFabric.Actors.Wcf\packages.config;
src\Microsoft.ServiceFabric.Services\packages.config;
src\Microsoft.ServiceFabric.Services.Remoting\packages.config;
src\Microsoft.ServiceFabric.Services.Wcf\packages.config"/>
<TestPackagesConfigs Include="@(PackagesConfigs);
test\unittests\Microsoft.ServiceFabric.Actors.Tests\packages.config;
test\unittests\Microsoft.ServiceFabric.Services.Remoting.Tests\packages.config;
test\unittests\Microsoft.ServiceFabric.Services.Tests\packages.config"/>
</ItemGroup>
<PropertyGroup>
<RebuildAllDependsOn>CleanProdAll;CleanTestsAll;BuildProd;BuildTest;CopyProdBinaries;CopyTestBinaries;GeneratePackages</RebuildAllDependsOn>
</PropertyGroup>
<PropertyGroup>
<BuildAllDependsOn>BuildProd;BuildTest;CopyProdBinaries;CopyTestBinaries;GeneratePackages</BuildAllDependsOn>
</PropertyGroup>
<!--Targets which can be invoked from Build.ps1-->
<Target Name="RebuildAll" DependsOnTargets="$(RebuildAllDependsOn)">
<Message Text="SUCCESS! Generated binaries and nuget packages are dropped at $(DropFolder)" Importance="High"/>
</Target>
<Target Name="BuildAll" DependsOnTargets="$(BuildAllDependsOn)">
<Message Text="SUCCESS! Generated binaries and nuget packages are dropped at $(DropFolder)" Importance="High"/>
</Target>
<Target Name="BuildProduct" DependsOnTargets="BuildProd;CopyProdBinaries">
<Message Text="SUCCESS! Generated binaries are dropped at $(DropFolder)" Importance="High"/>
</Target>
<Target Name="BuildTests" DependsOnTargets="BuildTest;CopyTestBinaries">
<Message Text="SUCCESS! Generated test binaries are dropped at $(DropFolder)\tests" Importance="High"/>
</Target>
<Target Name="GeneratePackages" DependsOnTargets="BuildProd;CopyProdBinaries">
<Message Text="Generating NuGet packages ..." Importance="High"/>
<MSBuild Projects ="@(NuprojsToBuild)" ContinueOnError ="false" Properties="Configuration=$(Configuration)" BuildInParallel="true"/>
<Message Text="Copying NuGet packages to drop folder ..." Importance="High"/>
<ItemGroup>
<Nupkgs Include="nuprojs\Microsoft.ServiceFabric.Actors\$(OutputPath)\Microsoft.ServiceFabric.Actors.*.nupkg"/>
<Nupkgs Include="nuprojs\Microsoft.ServiceFabric.Actors.Wcf\$(OutputPath)\Microsoft.ServiceFabric.Actors.Wcf.*.nupkg"/>
<Nupkgs Include="nuprojs\Microsoft.ServiceFabric.Services\$(OutputPath)\Microsoft.ServiceFabric.Services.*.nupkg"/>
<Nupkgs Include="nuprojs\Microsoft.ServiceFabric.Services.Remoting\$(OutputPath)\Microsoft.ServiceFabric.Services.Remoting.*.nupkg"/>
<Nupkgs Include="nuprojs\Microsoft.ServiceFabric.Services.Wcf\$(OutputPath)\Microsoft.ServiceFabric.Services.Wcf.*.nupkg"/>
</ItemGroup>
<Copy SourceFiles="@(Nupkgs)" DestinationFiles="@(Nupkgs->'$(NugetPackageDropFolder)\%(Destination)\%(Filename)%(Extension)')" />
</Target>
<!--Targets for restoring Nuget packages -->
<Target Name="RestoreProdNugetPackages">
<Message Text="Restoring NuGet packages for projects ..." Importance="High"/>
<Exec Command=""$(NuGetExePath)" restore %(PackagesConfigs.Identity) -NonInteractive -Verbosity quiet" />
</Target>
<Target Name="RestoreTestNugetPackages">
<Message Text="Restoring NuGet packages for test projects ..." Importance="High"/>
<Exec Command=""$(NuGetExePath)" restore %(TestPackagesConfigs.Identity) -NonInteractive -Verbosity quiet" />
</Target>
<!--Targets for building and copying product code. -->
<Target Name="BuildProd" DependsOnTargets="RestoreProdNugetPackages">
<Message Text="Building all projects ..." Importance="High"/>
<MSBuild Projects ="@(ProjectsToBuild)" ContinueOnError ="false" Properties="Configuration=$(Configuration)" BuildInParallel="true"/>
</Target>
<Target Name="CopyProdBinaries" DependsOnTargets="BuildProd">
<Message Text="Copying binaries to drop folder ..." Importance="High"/>
<ItemGroup>
<Binaires Include="src\FabActUtil\$(OutputPath)\FabActUtil.*"/>
<Binaires Include="src\FabActUtil\Microsoft.ServiceFabric.Actors.targets"/>
<Binaires Include="src\Microsoft.ServiceFabric.Actors\$(OutputPath)\Microsoft.ServiceFabric.Actors.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Actors.Wcf\$(OutputPath)\Microsoft.ServiceFabric.Actors.Wcf.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Services\$(OutputPath)\Microsoft.ServiceFabric.Services.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Services.Remoting\$(OutputPath)\Microsoft.ServiceFabric.Services.Remoting.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Services.Wcf\$(OutputPath)\Microsoft.ServiceFabric.Services.Wcf.*"/>
</ItemGroup>
<Copy SourceFiles="@(Binaires)" DestinationFiles="@(Binaires->'$(DropFolder)\%(Destination)\%(Filename)%(Extension)')" />
</Target>
<!--Targets for building and copying test code. -->
<Target Name="BuildTest" DependsOnTargets="RestoreTestNugetPackages">
<Message Text="Building all test projects ..." Importance="High"/>
<MSBuild Projects ="@(ProjectsToBuildIncludingTests)" ContinueOnError ="false" Properties="Configuration=$(Configuration)" BuildInParallel="true"/>
</Target>
<Target Name="CopyTestBinaries" DependsOnTargets="BuildTest">
<Message Text="Copying test binaries to drop folder ..." Importance="High"/>
<ItemGroup>
<Binaires Include="src\FabActUtil\$(OutputPath)\FabActUtil.*"/>
<Binaires Include="src\FabActUtil\Microsoft.ServiceFabric.Actors.targets"/>
<Binaires Include="src\Microsoft.ServiceFabric.Actors\$(OutputPath)\Microsoft.ServiceFabric.Actors.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Actors.Wcf\$(OutputPath)\Microsoft.ServiceFabric.Actors.Wcf.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Services\$(OutputPath)\Microsoft.ServiceFabric.Services.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Services.Remoting\$(OutputPath)\Microsoft.ServiceFabric.Services.Remoting.*"/>
<Binaires Include="src\Microsoft.ServiceFabric.Services.Wcf\$(OutputPath)\Microsoft.ServiceFabric.Services.Wcf.*"/>
<Binaires Include="test\unittests\Microsoft.ServiceFabric.Actors.Tests\$(OutputPath)\Microsoft.ServiceFabric.Actors.Tests.*"/>
<Binaires Include="test\unittests\Microsoft.ServiceFabric.Services.Remoting.Tests\$(OutputPath)\Microsoft.ServiceFabric.Services.Remoting.Tests.*"/>
<Binaires Include="test\unittests\Microsoft.ServiceFabric.Services.Tests\$(OutputPath)\Microsoft.ServiceFabric.Services.Tests.*"/>
</ItemGroup>
<Copy SourceFiles="@(Binaires)" DestinationFiles="@(Binaires->'$(DropFolder)\tests\%(Destination)\%(Filename)%(Extension)')" />
</Target>
<!--Targets for cleaning product and test code. -->
<!--
This target can be used to clean all of the projects before you build them.
It will also delete any dll & exe files located in the the DestinationFolder folder.
-->
<Target Name="CleanProdAll" DependsOnTargets="RestoreProdNugetPackages">
<Message Text="Cleaning all projects ..."/>
<!-- Delete any files this process may have created from a previous execution -->
<CreateItem Include="$(CurrentDir)\drop\**\*">
<Output ItemName="GeneratedFiles" TaskParameter="Include"/>
</CreateItem>
<Delete Files="@(GeneratedFiles)"/>
<RemoveDir Directories="$(CurrentDir)\drop"/>
<MSBuild Projects="@(ProjectsToBuild)" Targets="Clean" Properties="Configuration=$(Configuration);"/>
</Target>
<Target Name="CleanTestsAll" DependsOnTargets="RestoreTestNugetPackages">
<Message Text="Cleaning all projects ..."/>
<!-- Delete any files this process may have created from a previous execution -->
<CreateItem Include="$(CurrentDir)\drop\**\*">
<Output ItemName="GeneratedFiles" TaskParameter="Include"/>
</CreateItem>
<Delete Files="@(GeneratedFiles)"/>
<RemoveDir Directories="$(CurrentDir)\drop"/>
<MSBuild Projects="@(ProjectsToBuildIncludingTests)" Targets="Clean" Properties="Configuration=$(Configuration);"/>
</Target>
</Project>