The company I work at has a (in my opinion) slow build process. We use TFS, and checking in code takes several hours. It goes like this:
(Assuming change is made and code review has been approved)
First, you make your change and submit it for a preapproval step via a button in visual studio. This builds the entire visual studio solution and runs a subset of tests that we consider to be critical to the project. These builds are run in parallel for efficiency. If this succeeds, the next step is automatically kicked off. If this fails, you get a build email saying what tests failed and for what reason, at which point you must start over.
[This first step takes several hours to complete]
Second, the same set of tests is run as before with your change, except instead of these builds being run in parallel, they are serialized. If the build succeeds here, your changes are checked into the "mainline". (We used to use branches, but don't anymore). If this fails, you get a build email saying what tests failed and for what reason, and you must start over.
[This second step takes several more hours to complete]
Third, (remember the code is already checked in at this point), a more comprehensive build is run that runs all of the tests instead of just a subset. Because this build takes so long, changesets are batched up, and as before if the build fails you get an email saying which tests failed. Unfortunately, it can be hard to figure out if your change was the culprit.
[This third step takes several more hours to complete]
We have the concept of an "intermittent test". If a test fails, we run it up to two more times to see if it passes. We know this is bad, but have not made the effort to eliminate these kinds of tests.
Moreover, this process has lately been brought to a halt by issues with tests hogging too many resources on the build machines, or people skirting the process and directly checking in code, which breaks the first step.
For reference, the project size is on the order of a million lines of code. I don't expect builds to take several minutes, but after reading about people doing continuous integration and how it should take 10 minutes at most, you should be able to run all of your tests immediately, etc. I'm becoming very disheartened with the state of our process.
How could we improve our build process so that there is a shorter turnaround time between having a change ready and getting into the mainline?