JetBrains / teamcity-unity-plugin

TeamCity plugin supports building Unity projects
Apache License 2.0
81 stars 38 forks source link

Unity Player Runner #15

Open ArtOfSettling opened 5 years ago

ArtOfSettling commented 5 years ago

Something that we'd really find useful is a plugin similar to this, maybe teamcity-unity-player-plugin that would allow for the execution of a unity built player. It would need a very small feature set to be useful.

  1. Use a Command Line runner to run something that had been built from the teamcity-unity-plugin
  2. Tail the log file generated (similar to this plugin), so that we could see updates in realtime in the teamcity log

At the moment, we simply use the command line and artifact the log, but it could be nice to have teamcity functionality for this.

dtretyakov commented 5 years ago

@ArtOfSettling, could you please share the typical command for Unity Player which is used in your command line step?

ArtOfSettling commented 5 years ago

We have a relatively complex flow on TeamCity involving building for multiple platforms and a couple of small automation tests. One such automated test is run as follows....

We have a command line runner. It executes the following (Windows Version) Builds/build.exe -perfTest

Inside our unity player we have a bunch of code testing to see if the arg is passed and then we execute a simple performance test and dump out the results as an XML file that TeamCity processes using it's XML Report Processing functionality.

We also have an artifact of (Windows Version) %env.LOCALAPPDATA%Low(OUR COMPANY)\(OUR PRODUCT NAME)\output_log.txt

The output_log.txt file is generated by unity automatically, we don't do anything there, we're just artifacting the file, it would just be really great to have this tailed at the same time we started the build (as the unity runner is doing right now)

For me it's more complicated than that because i'm running automation tests on a variety of platforms i'm not sure i'm allowed to talk about them here, but if you also wanted to add support for unity players on many other platforms i'd be very happy ;)

So, essentially, all i'm really asking for is a command line runner that lets you tail a log file instead of the STD OUT from that process. The runner could in theory also support unity's runtime test suite, and performance monitoring solution but that would again be nice to have functions.

dtretyakov commented 5 years ago

@ArtOfSettling, thanks a lot for additional details.

The runner could in theory also support unity's runtime test suite, and performance monitoring solution but that would again be nice to have functions.

Did you tried using TeamCity Performance Monitor build feature which could provide info about CPU/disk/memory consumption during the build?

ArtOfSettling commented 5 years ago

We do use this and it was great for optimising the EC2 instance type we use when building, but it doesn't give us the detailed information we need.

We're looking into dumping out unity's performance data for a frame by frame analysis and comparison. Essentially wanting to find out which commit introduces slowdowns and gpu bottlenecks.

https://docs.unity3d.com/ScriptReference/Profiling.Profiler.html

To be fair, we're not using exactly unity's Profiling class and doing a whole bunch of additional tracking for our performance sessions but we're working on a high performance product.

If TeamCity's built in PerfMon also tracked GPU data AND we had log tailing support for unity built players, that would be amazing, since TeamCity's PerfMon already allows us to trace performance impact to build log lines.