build performance optimisations

pull/288/head
ArnoldZokas 15 years ago
parent fca5d2b6a2
commit d10c5e794d
  1. 8
      ProtocolBuffers.build
  2. 8859
      cfg/Build.log
  3. 17
      cfg/Common.targets
  4. 5
      cfg/build with diagnostics.bat
  5. 2
      cfg/build.bat
  6. 24
      cfg/build.csproj
  7. 2
      cfg/buildAll.bat

@ -271,10 +271,10 @@
<property name="Platform" value="Any CPU" /> <property name="Platform" value="Any CPU" />
</msbuild> </msbuild>
<!-- Note the deliberate lack of space in the platform name --> <!-- Note the deliberate lack of space in the platform name -->
<msbuild project="${src}/ProtocolBuffers/ProtocolBuffersCF.csproj"> <!--<msbuild project="${src}/ProtocolBuffers/ProtocolBuffersCF.csproj">
<property name="Configuration" value="Release" /> <property name="Configuration" value="Release" />
<property name="Platform" value="AnyCPU" /> <property name="Platform" value="AnyCPU" />
</msbuild> </msbuild>-->
</target> </target>
@ -327,12 +327,12 @@
<include name="ProtocolBuffers/bin/Silverlight2/Google.ProtocolBuffers.dll" /> <include name="ProtocolBuffers/bin/Silverlight2/Google.ProtocolBuffers.dll" />
</fileset> </fileset>
</copy> </copy>
<copy todir="${output-dir}/CompactFramework35" <!--<copy todir="${output-dir}/CompactFramework35"
flatten="true"> flatten="true">
<fileset basedir="${src}"> <fileset basedir="${src}">
<include name="ProtocolBuffers/bin/ReleaseCF/Google.ProtocolBuffers.dll" /> <include name="ProtocolBuffers/bin/ReleaseCF/Google.ProtocolBuffers.dll" />
</fileset> </fileset>
</copy> </copy>-->
<copy todir="${output-dir}"> <copy todir="${output-dir}">
<fileset basedir="${project::get-base-directory()}"> <fileset basedir="${project::get-base-directory()}">
<include name="protos/**" /> <include name="protos/**" />

File diff suppressed because it is too large Load Diff

@ -8,7 +8,7 @@
<Target Name="_Compile"> <Target Name="_Compile">
<MSBuild Projects="%(Solution.Identity)" Properties="Configuration=%(Solution.Configuration);Platform=%(Solution.Platform)" <MSBuild Projects="%(Solution.Identity)" Properties="Configuration=%(Solution.Configuration);Platform=%(Solution.Platform)"
Targets="%(Solution.BuildTarget)" BuildInParallel="true" Condition="%(Solution.CompileGroup) == $(CompileGroup)" /> Targets="%(Solution.BuildTarget)" BuildInParallel="true" Condition="%(Solution.CompileGroup) == $(CompileGroup)" ToolsVersion="4.0" />
</Target> </Target>
<Target Name="_EnsureEnvironment"> <Target Name="_EnsureEnvironment">
@ -16,7 +16,7 @@
<Error Text="Tool &quot;Protogen&quot; could not be found at path $(ProtogenExePath)" Condition="!Exists($(ProtogenExePath))" /> <Error Text="Tool &quot;Protogen&quot; could not be found at path $(ProtogenExePath)" Condition="!Exists($(ProtogenExePath))" />
</Target> </Target>
<Target Name="_GenerateSource"> <Target Name="_GenerateSource" DependsOnTargets="_Clean;_Compile;_Compile">
<PropertyGroup> <PropertyGroup>
<ProtosList>@(Protos)</ProtosList> <ProtosList>@(Protos)</ProtosList>
<Args>$(ProtosList.Replace(`;`,` `))</Args> <Args>$(ProtosList.Replace(`;`,` `))</Args>
@ -26,20 +26,25 @@
<Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" /> <Exec Command="$(ProtogenExePath) compiled.pb" WorkingDirectory="$(BuildTempDirectory)" />
</Target> </Target>
<Target Name="_CopyGeneratedSource"> <Target Name="_CopyGeneratedSource" DependsOnTargets="_GenerateSource">
<Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" /> <Copy SourceFiles="%(GeneratedSource.Identity)" DestinationFiles="%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)" />
</Target> </Target>
<Target Name="_Test"> <Target Name="_CompileGeneratedSource" DependsOnTargets="_CopyGeneratedSource">
<MSBuild Projects="%(Solution.Identity)" Properties="Configuration=%(Solution.Configuration);Platform=%(Solution.Platform)"
Targets="%(Solution.BuildTarget)" BuildInParallel="true" Condition="%(Solution.CompileGroup) == $(CompileGroup)" />
</Target>
<Target Name="_Test" DependsOnTargets="_CompileGeneratedSource">
<Exec Command="&quot;$(NUnitExePath)&quot; %(NUnitTests.Identity) /xml=%(NUnitTests.Filename)%(NUnitTests.Extension).xml" WorkingDirectory="$(BuildTempDirectory)" /> <Exec Command="&quot;$(NUnitExePath)&quot; %(NUnitTests.Identity) /xml=%(NUnitTests.Filename)%(NUnitTests.Extension).xml" WorkingDirectory="$(BuildTempDirectory)" />
</Target> </Target>
<Target Name="_Package"> <Target Name="_Package" DependsOnTargets="_CopyGeneratedSource">
<Copy SourceFiles="@(PackageContents)" DestinationFolder="$(PackageOutputDirectory)\%(PackageContents.TargetDirectory)\%(PackageContents.RecursiveDir)" /> <Copy SourceFiles="@(PackageContents)" DestinationFolder="$(PackageOutputDirectory)\%(PackageContents.TargetDirectory)\%(PackageContents.RecursiveDir)" />
</Target> </Target>
<!-- <!--
BENCHMARK - this needs optimising but it is 1 AM and I need to be up in 5 hours BENCHMARK - this needs optimising
--> -->
<Target Name="_GenerateBenchmarkSource"> <Target Name="_GenerateBenchmarkSource">
<PropertyGroup> <PropertyGroup>

@ -0,0 +1,5 @@
@echo off
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /l:FileLogger,Microsoft.Build.Engine;logfile=Build.log;append=true;verbosity=diagnostic;encoding=utf-8
pause

@ -1,5 +1,5 @@
@echo off @echo off
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m
pause pause

@ -26,7 +26,7 @@
<NUnitExePath>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath> <NUnitExePath>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
</PropertyGroup> </PropertyGroup>
<Import Project="Targets\Common.targets"/> <Import Project="Common.targets"/>
<ItemGroup> <ItemGroup>
<WorkingDirectories Include="$(BuildTempDirectory)" /> <WorkingDirectories Include="$(BuildTempDirectory)" />
@ -36,31 +36,31 @@
<Solution Include="$(SolutionFile)"> <Solution Include="$(SolutionFile)">
<Configuration>$(BuildConfiguration)</Configuration> <Configuration>$(BuildConfiguration)</Configuration>
<Platform>Any CPU</Platform> <Platform>Any CPU</Platform>
<BuildTarget>Rebuild</BuildTarget> <BuildTarget>Build</BuildTarget>
<CompileGroup>Build</CompileGroup> <CompileGroup>Build</CompileGroup>
</Solution> </Solution>
<Solution Include="$(SolutionFile)"> <Solution Include="$(SolutionFile)">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Any CPU</Platform> <Platform>Any CPU</Platform>
<BuildTarget>Rebuild</BuildTarget> <BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup> <CompileGroup>BuildAll</CompileGroup>
</Solution> </Solution>
<Solution Include="$(SolutionFile)"> <Solution Include="$(SolutionFile)">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Any CPU</Platform> <Platform>Any CPU</Platform>
<BuildTarget>Rebuild</BuildTarget> <BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup> <CompileGroup>BuildAll</CompileGroup>
</Solution> </Solution>
<Solution Include="$(SolutionFile)"> <Solution Include="$(SolutionFile)">
<Configuration>Silverlight2</Configuration> <Configuration>Silverlight2</Configuration>
<Platform>Any CPU</Platform> <Platform>Any CPU</Platform>
<BuildTarget>Rebuild</BuildTarget> <BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup> <CompileGroup>BuildAll</CompileGroup>
</Solution> </Solution>
<!--<Solution Include="$(ProjectDirectory)\src\ProtocolBuffers/ProtocolBuffersCF.csproj"> <!--<Solution Include="$(ProjectDirectory)\src\ProtocolBuffers/ProtocolBuffersCF.csproj">
<Configuration>$(BuildConfiguration)</Configuration> <Configuration>$(BuildConfiguration)</Configuration>
<Platform>AnyCPU</Platform> <Platform>AnyCPU</Platform>
<BuildTarget>Rebuild</BuildTarget> <BuildTarget>Build</BuildTarget>
<CompileGroup>BuildAll</CompileGroup> <CompileGroup>BuildAll</CompileGroup>
</Solution>--> </Solution>-->
@ -153,16 +153,8 @@
</ItemGroup> </ItemGroup>
<!--target groups--> <!--target groups-->
<Target Name="Build" DependsOnTargets="_Clean;_Compile;_EnsureEnvironment;_GenerateSource;_CopyGeneratedSource"> <Target Name="Build" DependsOnTargets="_Clean;_Compile;_EnsureEnvironment;_GenerateSource;_CopyGeneratedSource;_CompileGeneratedSource;_Test" />
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_Clean;_Compile" Properties="ForceTargets=true" /> <Target Name="BuildAll" DependsOnTargets="_Clean;_Compile;_EnsureEnvironment;_GenerateSource;_CopyGeneratedSource;_CompileGeneratedSource;_Test;_Package" />
<CallTarget Targets="_Test" />
</Target>
<Target Name="BuildAll" DependsOnTargets="_Clean;_Compile;_EnsureEnvironment;_GenerateSource;_CopyGeneratedSource">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="_Clean;_Compile" Properties="ForceTargets=true" />
<CallTarget Targets="_Test;_Package" />
</Target>
<Target Name="Benchmark" DependsOnTargets="_Clean;_GenerateBenchmarkSource;_CompileBenchmarkAssembly;_PrepareBenchmarkEnvironment;_RunBenchmark" /> <Target Name="Benchmark" DependsOnTargets="_Clean;_GenerateBenchmarkSource;_CompileBenchmarkAssembly;_PrepareBenchmarkEnvironment;_RunBenchmark" />
</Project> </Project>

@ -1,5 +1,5 @@
@echo off @echo off
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /t:BuildAll /p:CompileGroup=BuildAll %WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /t:BuildAll /p:CompileGroup=BuildAll /m
pause pause
Loading…
Cancel
Save