Search Unity

Automated builds?

Discussion in 'Formats & External Tools' started by gutripper, Oct 31, 2008.

  1. gutripper

    gutripper

    Joined:
    Sep 30, 2008
    Posts:
    45
    Automated builds and test suites are becoming more common in games and software development in general. Using tools like CruiseControl to do automated testing can add a lot of robustness to a project, especially when the requirements are changing, as often happens with games during early prototyping phases.

    With the custom Unity Assert Server appearing to be a requirement for a team more than one developer, I'm thinking about how we can scale our team and processes to use Unity.

    I across this (http://www.unifycommunity.com/wiki/index.php?title=UUnit) test harness which looks interesting. I'm wondering if anybody has tried it out, and whether anybody has had any success setting up an automated build system for a Unity project. If so, what tools can you recommend?


    Thanks,

    Paul Turbett
    CTO,
    Spinfast. A Game Studio.
     
  2. Lucas Meijer_old

    Lucas Meijer_old

    Joined:
    Apr 5, 2008
    Posts:
    436
    We use CruiseControl.NET as our buildserver. We don't really use much of its features, we just have it call our SCons script that does the actual build.
    CC.NET has always worked nicely for us, I like that it has a windows ccnettray application so that our windows based artists can initiate builds, and get their results.

    Ever since 2.1 you can make unity builds from the commandline. In the most simple case, that's what you'll have cruisecontrol do. If your case is more complex, (like the unityweb file not being the only thing that has to be build), you can have it run your buildsoftware of choice.

    As for buildsoftware, SCons often gets beatings in public, but I like it nonetheless. It's weak point is that it's slow. I don't have tons of .cpp files to scan though, most of my dependencies are within assets. (max->fbx, or max->customexportformat, or psd->lots of png files)

    I can't wait untill the windows version comes out, and there will be a single platform again that could run a full build of our game. (we require max to build, and unity to build, and there's no mutual OS that they can run on at the moment).

    As for testing, it's easy to test anything that's not a monobehaviour. you can just compile those .cs files yourself using mono, and then use NUnit to run its unit tests. Testing your MonoBehaviour's is more difficult though, as you'd either have to do the testing inside unity itself, or you'd need to mock out the unity application. Most of our code is not in monobehaviours, so right now we just have 0 test coverage on our monobehaviours.

    w.r.t. distributing results of a buildserver. That is something that has always amazed me, there does not seem to be a decent solution out there at all. There is "upload it to this ftp account" or "upload to this ssh server" stuff, but for our usecase that makes no sense. Our art dudes make maybe 15 commits per day each, and want to see how those changes work out quickly. Some changes we can see in unity immidiately, but our game is multiplayer, so sometimes they need a new serverbuild as well to test their changes. It is therefore critical that downloading the results of the buildserver is fast and efficient. Right now we use a custom rsync based approach, where our art guys can use a custom tool to rsync their build to a certain buildserver output revision. For .unityweb files this doesn't really help much, but if you (at least during development) build a standalone, then your build consists of lots of small files, which can all be efficiently "culled" by rsync as it only will download the new stuff that you want. (doesn't make sense to redownload UnityEngine.dll for each small thing you do).

    Bye, Lucas
     
  3. gutripper

    gutripper

    Joined:
    Sep 30, 2008
    Posts:
    45
    Thanks for the info Lucas, great stuff. So you are using CruiseControl.NET on windows and remotely building Unity builds? Or did you get CC.NET going under OSX with Mono ?