Wednesday, June 07, 2006

Who needs it?

Tonight, rather than sleep, I have been working on getting continuous integration set up in my personal development environment.

What is continuous integration, you ask? I’ll tell you. Basically, CI is the process by which every time code is changed in the repository, a build is kicked off, and the results of the build are displayed for all to see. A repository is the place where good developers(Eric’s thoughts, Joel’s thoughts) store their source code, and provides many benefits. Check out Eric Sink’s articles on source control for more information.

This task was not as simple as I thought it would be. I’m monitoring two projects (SpaceRocks! and my ‘engine’) with my CI server. I chose CruiseControl.NET for my CI server. Download the really small installer, and it’s ready to go in minutes. Of course, then you have to configure the projects.

I ran into a couple of gotchas, mostly around using cc.net and Vault (still the best source control system for smaller shops ever built). The biggest one is that the cc.net service has to run as a user account (not the system account), in order for the Vault tasks to work. I had to look for a long time to find the problem. The looking time was compounded by the fact that the cc.net error message was less than informative.

Second, I ran into a couple of minor issues using cc.net and MSBuild. Recently, I converted SpaceRocks! and the supporting projects into C# 2.0, so I could use the new features of the language, and of VS 2005.

Once I got those two things worked out, I was ready to roll. Of course, the build was still failing, since I hadn’t ever built the project on the server machine before (I do all my dev work on laptops and on my main desktop). I need the DirectX SDK before I can build successfully (which I’m downloading now).

Next, I’m going to spend some time in the code getting the unit tests working again, and I’m going to start working towards increasing my code coverage. I had let my tests slack off, since I was on such a roll with the game. I’m ahead of schedule, and feeling guilty about not having more tests in the code.