How does TeamCity leverage incremental builds?

I have a software project where builds can take hours to complete but only a fraction of the time incrementally. Additionally, my environment uses NFS so there's no need to transfer sources between the server and agents. How can I get multiple builds of the same build config in this environment? Right now I have TeamCity setup to build the software at a fixed path but that limits the number of simultaneous builds to 1. If I setup a config with server or agent checkout, then TeamCity seems to spend time transferring sources to the agents when it doesn't need to and worse yet isn't able to send the object files. Is this not a problem in practice? Maybe TeamCity is able to reuse a small number of agents to minimize incremental build time? In theory, object caching would solve this problem but doesn't work in practice on my project and we haven't spent the time to get it working but there's also parts of our build which aren't so easily reused (generating dependencies for example).

4 comments
Comment actions Permalink

It is recommended to let TeamCity do the update of checkout directory, see notes. TeamCIty should be able to perform incremental updates of the checkout directory.

If you are not able to checkout from CVS with the help of TeamCity, that is to be investigated.
Is this addressed by the issue TW-19425 you have filed?

0
Comment actions Permalink

These issues are unrelated - I'm just having trouble understanding how it works. Suppose I'm using agent checkouts and 2 concurrent builds start. Each agent needs to check out its own copy of the VCS root and then perform a full build. Suppose that then they finish and a single build starts later. Does it also need to be built from scratch or is TeamCity smart enough to find an agent which recently built the software and reuse the same path so that object files can be built incrementally? As a further complexity, consider that the files that agents are checking out are visible to all agents since they are present on NFS. Can TeamCity take advantage of this property so that it doesn't need to reuse the same agent (any agent would do it just needs to run the build in the same path)?

0
Comment actions Permalink

Uri,

> Does it also need to be built from scratch or is TeamCity smart enough to find an agent which recently built the software and reuse the same path so that object files can be built incrementally?

find an agent which recently built the software - NO, an agent is used with smaller build estimate. Build estimate is calculated by the previous builds durations
reuse the same path so that object files can be built incrementally - YES. The same build checkout directory is used. Default checkout directory is reused between all the builds with identical VCS settings.

> As a further complexity, consider that the files that agents are checking out are visible to all agents since they are present on NFS. Can TeamCity take advantage of this property so that it doesn't need to reuse the same agent (any agent would do it just needs to run the build in the same path)?

No, at this time there is no support to share checkout direcotires between agents.

0
Comment actions Permalink

Got it - thanks! I will have to come up with a clever sandbox recycling strategy then.

0

Please sign in to leave a comment.