📜 ⬆️ ⬇️

Continuous integration with unity

With the transition to a new project on Unity with a relatively large development team, the need for automatic assembly and delivery of the application to devices for testing has sharply arisen. Here's how the situation was with this when I came to the project (on iOS):
  1. On a separate mac-machine, the project was manually pumped out of the repository (Asset Sever).
  2. Manually ( File-> Build Settings-> Build & Run ) started the build into the xCode project.
  3. Further in xCode the archive ( Archive ) became.
  4. The archive was exported to an ipa-file, which was manually uploaded to TestFlight.
  5. Further, already in TestFlight access was provided to the necessary testers.

Everything described above is automated with the help of so-called continuous integration (eng. Continuous Integration , CI ). For my previous projects, TeamCity from JetBrains (the creators of the convenient Resharper code refactoring tool) was used for these purposes. TeamCity (TC) is a very powerful software product that fulfills the goals set for the continuous integration system, at 100%. He can even more. But this article is not about him (there are already articles on him ), but about the new Unity Cloud Build service , especially for developers on the Unity engine.

UPD . Unity released Unity Cloud Build to the light, and I updated the article :) Read about changes and innovations below.

First I want to warn you that some of the links below require access to the Unity Cloud Build, its forum and documentation.

Problem


We have a large project, and the whole procedure described above took half an hour or more . The Mac on which the builds were made was slow. Programmers rarely installed the application on the device (everything was checked mainly in the editor). And therefore, one approach was usually not enough, because after downloading to the device in the application, suddenly (according to the law of meanness) errors were detected. In addition, there was no normal QA. In addition, all this was done on Friday night - i.e. we get all unfavorable conditions for such an important thing :)
')
It is clear that this could no longer continue. The solution had to be, of course, complex, and as one of its parts I set the task: to introduce CI into the development. The task was set as follows:

Last time, in TeamCity, I killed just about a day to set up the first build, but then I set up and maintained these builds for a long time. In addition, it requires hosting on its server, its configuration and support. And this time I decided to try the Unity Cloud Build. Recently, I heard a lot about him and first of all I bought what I don’t need to have my server and mac as a machine for building, everything is done on their side.
Unity acquired the Tsugi platform and built the Unity Cloud Build on its base. Now the service is already publicly available, any Unity developer, even the owner of the free version, can register and use the system on the free plan by default. I registered with UCB on their page and started setting up the first build.

Customization


It took me about 15 minutes to set up. It is interactive and goes through several stages.

After that, the system will automatically start building the project. At the end of the process, a compact and detailed log of the assembly, the application itself + packed dSYM (for iOS) will be available.
UPD . As it turned out, in the case of Android, UCB is not able to split apk into expansion files. So in this case, you can use UCB for testing only, and release the build to build manually.

Distribute the collected application


UCB has several options for “sharing” an assembly:



Other features



Additional settings


In the settings there is an Advanced Settings section. Most recently, it was available only on request, in test mode. Now available for paid subscription holders.


Subscriptions and price


With the release of the Unity Cloud Build system, subscriptions have been introduced. There are 4 types of subscriptions, each new one includes the previous one:
1. Free .

2. Pro .

3. Studio .

4. Enterprise .




Disadvantages or anything else you want



Summary


So, I liked the Unity Cloud Build. The project is developing, the forum is asked about current requests from developers and they are gradually implemented, technical support responds fairly quickly. If you are developing projects on Unity and are thinking about CI, I recommend trying Unity Cloud Build. Save time and money.

Pros:

Minuses:


Waiting for questions, suggestions, clarifications in the comments!

Perhaps someone will be interested to read my previous articles:

Good luck in your development!

Source: https://habr.com/ru/post/250153/


All Articles