![]() |
|
![]() Build FasterGenerally, developers are only notified of build breakages after the build breaks. If it takes an hour to communicate that to the team, there is an hour in which they can update to broken code without being warned. If the build is reduced to five minutes, the likelihood of updating to broken code without receiving a warning dramatically shrinks, and developers can work with more confidence. This is a key motivating factor behind having the second pillar of pain free building be "maintain short builds". Componentization of projects helps keep the builds short. Instead of building the entire application, a build only acts on a single component and uses the already built artifacts from dependent projects. However, if the application can't be further componentized, other techniques for build acceleration can be used. Postpone or Reassign Slow Tests & Documentation GenerationOften, the slow part of a build is not the actual compile and package pieces, but additional tasks like generating documentation or running automated functional tests. Code documentation and static analysis can typically be run in parallel with the build on another server. Likewise, tests can often be split into test suites that can be run in parallel. For other items, teams may choose to run them as a secondary process and not as part of the main build. Perhaps a slow test suite takes two hours to run, but the project builds in 10 minutes. In that case, you can use the binary promotion strategy to build on every commit, and then run the longer tests on the most recent successful build when testing hardware is available. Use a RAM DriveA clever strategy from Jeffery Palermo at Headspring, is to build on machines that have extra RAM and use a RAM drive to improve I/O performance. His discussion of the strategy is available on his blog.Build AccelerationSometimes, the build itself just needs to run faster, especially when practicing Continuous Integration. A pure build acceleration strategy can be as simple as more and better hardware: Memory, CPU and hard disk upgrades can make noticeable improvements in build times. Often, pieces of the build can be run in parallel on different machines. There are also tools like Xoreax's IncrediBuild which can dissect your build automatically and distribute parallizable parts out to a build farm. These tools are a natural complement to a build and release automation server like AnthillPro. Working Around Slow BuildsIf the team just can't get the build any faster, they can use a number of tools to communicate that a build is in progress. For developers working in open floor plans, the Continuous Integration server can turn on a simple light or lava lamp when the build is in progress. A large monitor or TV can display the status of many projects simultaneously. IDE plug-ins can indicate when a build is in flight as well. |