I'm working on some software that needs to run on multiple platforms. Periodically doing manual checkouts on each system, building, testing, fixing, yada yada, it all gets a bit tired after a while. So, being a lazy hacker, I decided to automate things, and went off in search of a tool.
Being a huge Python fan helps, and it didn't take long at all before I came across BuildBot, which happens to be implemented in Python, but can drive just about any sort of project you care to throw at it. I installed
yesterday, and I'm well impressed.
Installing BuildBot is pretty easy (the included instructions cover pretty much all you need). It's not much beyond installing the dependencies (ZopeInterface and Twisted), then doing the old two-step, of untarring the source then:
python setup.py install --prefix=/usr/local
The configuring, that is the tricky bit - and necessarily so, since that is the part that is completely dependent upon your own source code, configurations, build styles, etc. Fortunately, BuildBot is extremely flexible and provides support for all sorts of different build styles and configurations. For example, you can configure it to do a nightly checkout of the subversion trunk, build it, and run all the unit tests. The results from each step are logged, and you can see the status of everything in a colour-coded web page.
The architecture is simple: you have a central Build Master, which controls everything. It is responsible for monitoring for changes, producing reports, handling emails, scheduling jobs, sending out build jobs, collating the results, and so on.
You have one or more Build Slaves, which connect to the build master (in a star topology) and build jobs as requested. So you can simply set up a slave on each platform you wish to support (in our case it's Solaris, Linux, Mac and Windows).
I had a basic system up and running pretty quickly, and spent a few hours getting the settings right for our project. It's important to sort out environmental considerations, as getting things set up to auto-build can often highlight assumptions about where files are to be found, environment variables that are (not) set, and so on. Fixing all these issues however makes for a better system all round.
I did have one nasty problem, however - for some reason, on Solaris the the slaves were unable to detect when the child processes had exited, so it looked like they were hanging. The solution was to disable pty (pseudo-tty) support in the slave's .tac file, thus:
usepty = 0
I found this article on BuildBot particularly useful.




