continuous-integrationnightly-build

What is the difference between a nightly build and continuous integration?


What is the difference between nightly builds and continuous integration? Is it just the frequency of checkin/build/test? For example, if a nightly build process were run every hour or every minute would it be indistinguishable from CI?

This question is similar but not identical: Continuous Integration vs. Nightly Builds


Solution

  • Continuous Integration focuses on building (and running tests) every time a checkin is done. Nightly builds do it once a day and may emphasize testing less.

    In practice the continuous integration checkins that trigger building and running tests might be separate from checkins that a developer does throughout the day. They might occur, for instance, only when checking in to the trunk while most development for the day is checked in to a branch. It is encouraged that these occur relatively frequently, for instance once a day.

    Building more frequently would produce similar results but would probably result in some wasted effort, that is running tests when nothing has changed. Another possible difference is that a significant level of testing is done with each build in continuous integration. Sometimes requiring developer intervention to fix errors that result. This would be more difficult with a nightly build process for several reasons. Including being more difficult to tie the errors to a particular set of changes and responsible party.