Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Brainstorming for meetup talk on build automation with Unity

Discussion in 'Testing & Automation' started by liortal, Jul 5, 2019.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,257
    Hi guys,

    I am going to give a talk next month in a local meetup about setting up an automated build process with Unity.

    What in your opinion would be interesting or mandatory topics that should be mentioned in such a talk?

    Any ideas or suggestions could be helpful!

    All slides, code samples and any supplemental materials will be published online, so stay tuned :)
     
    Stormy102 likes this.
  2. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    • The different options in terms of build servers
    • The basics of setting up builds via scripts using -executeMethod
    • Common gotchas such as the Unity log not being output in the build server's log and solutions
    • Configuration of tests to work within Unity
    I mean, we have our own custom Unity runner which strips certain repeated and redundant lines from the log output. We also have builds for different platforms, so we symbolic link the Library file for the necessary build, which cuts down on reimporting times. We also run a bunch of code duplication and we've got Sentry integrated but that's really just extra fat that we choose to do. I think the biggest takeaway is that it is possible with Unity and more people need to move over to this style of development rather than taking away a dev's machine to build on :p
     
    liortal likes this.
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,257
    Good points. In terms of local hardware vs. Cloud - what are u using?
     
  4. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    We've got an Intel NUC (i5 processor, 8GB RAM, 1TB SSHD & Windows Server 2016) with TeamCity. We used Unity Cloud Build for a while but we found it wasn't good enough for what we wanted re flexibility so we took it in-house. We've only got one build agent (that on the server) but builds take between 20m and 30m so its not too much of an issue.
     
  5. daniel-hagstrom

    daniel-hagstrom

    Joined:
    Apr 11, 2016
    Posts:
    5
    @Stormy102 Interesting idea to symlink in the Library depending on target platform/SKU. I'd be worried about eventual Library corruption, but maybe you've been able to avoid that? I would imagine you do this instead of running a cache server, then?

    @liortal How did the talk go? Any learnings or such?
     
  6. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    Yeah it arose out of the issue of needing to clean the build area between builds without having a cache server - we only use one machine currently for builds. The only Library corruption occurred when we upgraded from 2017.3 to 2019.1 - I'd imagine doing incremental upgrades would have reduced the likelihood of that happening...
     
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,257
    The meetup happened yesterday, but unfortunately i was unable to do the session due to personal circumstances... next time.