Monday, July 28, 2008

Automating the Build Process

This is the first in a series of articles about automating the build process. While the specifics often involve Windows and VS, hopefully this information is generic to applied cross-platform. The basics have been covered quite well elsewhere. One good resource is http://www.codeplex.com/treesurgeon/Wiki/View.aspx?title=DevelopmentTreeIntroduction&referring.

Briefly, essential tools:

  • Compiler, Editor - VS - Actually not that essential, but is in quite common use and includes all the tools needed for compiling and linking. Even those people who use alternative tools, usually know something about how VS works.
  • Source control - SVN - quite popular for the last few years and there is a reason for it. Easy to use and integrates well.
  • Builder - msbuild - will control the building of the components, include with .NET framework.
  • Builder - nant - will control the building of the components

It seems like there is sometimes a debate of which one to use, nant or msbuild, with various camps lining up on one side or the other. My solution is to use them both. More details, later, but in short, I like using msbuild and just give it my automatically made VS solution file and away it goes. I wrap this task (and others) in a nant build file, which is a little bit friendlier to hand edit.

  • Unit Testing - nunit - For .NET components
  • Unit Testing - UnitTest++ - Currently the one I like for c++

Directory structure

Having a consistent directory structure across components and projects is essential. I can't say more then already mentioned article and it's associated project, Tree surgeon http://www.codeplex.com/treesurgeon.

No comments: