Continuous Integration is all the rage. At least, it is among the people I hang out with at parties. Believe me, everyone wants on this train.

Seriously though, if you’ve heard of Continuous Integration and think that it may be a good idea for your development team to start adopting it, good for you! You are a smart and competent person. I like you. We should talk.

But… before you can integrate continuously, there’s a couple of pesty prerequisites that you need to meet. In order of priority, they are:

  • use version control (preferably git)
  • completely automate your software builds
  • create a repeatable, automated build environment *
    (*) optional, but highly recommended

Let’s break these down one at a time.

Prereq 1: Version Control

I feel like this shouldn’t need to be said, but just in case you’ve been under a rock for the past 20 years, your development team must use a modern version control system. Preferably git. Really, git won. It has its downsides, but it’s the de facto standard. Sorry, Mercurial.

Subversion? Get that crap out of here.

Your development team is resisting git?

Got a bunch of grumpy embedded developers that don’t want to learn the new way of doing things?

Send them my way, and I’ll set them straight.

Prereq 2: Automated Software Builds

One of the key components of continuous integration is the the computer builds your software for you. This means that everything you build (and hopefully test) during your build process must be completely automated.

Running a single script from the command line must compile all your code, create installers, perform static analysis, everything.

If you have to click a button in the user interface of your IDE, that won’t work. No can do. Your compiler has a command line interface. If it doesn’t, get a different compiler. But, I promise, it does. Use it.

Prereq 3: Repeatable Build Environments

This one is not strictly necessary. You can run continuous integration on a build server that has been manually configured with all the components of your build environment. But, please don’t do that. Read my earlier post on creating a repeatable build environment with Vagrant. In the future, I’ll explore other techniques. Regardless, you’ll thank me in the long run.

Prereqs Done? Let’s do this thing.

Next time I’ll talk about the basic steps involved in setting up Continuous Integration.

Until then…

Happy developing!