views:

317

answers:

2

I just committed a very large 3rd party library (Boost) into our source control. I set it up with its own repository. I tagged its version so that other projects could svn:externals this specific version.

This is perfectly fine, until I realize that my Continuous Integration (CI) server will do a complete check out everytime I checked-in some code. (Obviously, I intentionally set up my CI server like that in the beginning). This could lead to a very long checkout time on CI server end.

So the question is: is this a good thing? Can someone suggest potentially a better way to handle this pattern?

EDIT: I'm using TeamCity CI server.

+3  A: 

Some possibilities come to mind:

  1. Change CI to update incrementally.
  2. Avoid svn:externals, instead symbolic link the checkout during the build.
sanxiyn
I think 1) sounds like a good idea. Perhaps if I could configure the CI server to simply do an svn:update on the files that changed, and try to re-build/unit tests instead of a full check out, that might be better.
ShaChris23
for number 2) when you say symbolic link..you mean to check out the 3rd party library somewhere on the CI server, and just have the project link to that directory? (next time project is checked out again, 3rd party library is not touched)
ShaChris23
+6  A: 

TeamCity, by default, is configured to cache the exported sources (Checkout mode: Automatically on server). This means that the first build may take some time, but subsequent builds will be significantly faster as it only loads the changed files. Automatic clean checkouts will only happen in certain circumstances.

If you have checked in the entire 3rd party library, including documentation and source, you may want to create a checkout rule that filters out those extraneous files so that you are only left with the binaries you need to compile your solution (assuming you have checked in compiled binaries).

TeamCity allows multiple VCS roots in each build configuration, so it may be easier for you to exclude externals in your main VCS root (which is the default), then add another VCS root pointed to your other repository, with a checkout rule to put the Boost precompiled libraries in the expected directory.

For more information on clean checkouts and checkout rules, see:

http://www.jetbrains.net/confluence/display/TCD4/Clean+Checkout#CleanCheckout-sourcescache http://www.jetbrains.net/confluence/display/TCD4/VCS+Checkout+Rules

Richard Cirerol