Codemagic: Developing an Ultimate CI/CD Solution for Unity Developers

Codemagic's Solutions Engineer Kevin Suhajda has told us about Codemagic, a mobile CI/CD provider, explained what CI/CD and DevOps are, and discussed the benefits of the company's recently-announced tool.

Recently, an Estonia-based company Nevercode, the team behind a mobile CI/CD provider Codemagic, had announced support for Unity CI/CD. It offers powerful macOS and Windows build machines with Unity SDK preinstalled, allowing game developers to build Unity projects in the cloud faster and adhere to DevOps best practices.

The team commented that with CI/CD for Unity comes a variety of benefits, including but not limited to faster time to market, automated publishing to stores, easy maintenance and updates, improved workflows within the team, higher test reliability, extended options for test automations, and seamless deployment to testers and stakeholders.

To learn more about Codemagic, DevOps, CI/CD, and how it can help developers, we contacted the Codemagic team and they agreed to tell us more about it and explain the benefits of using their technology. You can check out our interview with Codemagic's Kevin Suhajda down below.

Introduction

Hi, I’m Kevin Suhajda. I work for Codemagic as a Solutions Engineer. Previously, I worked as a Web Developer and then a Mobile Application Developer.

Nevercode, the company behind Codemagic, started as a branch of a development agency that wanted to have its own CI/CD service. But then it evolved into a separate company, and three years ago, we partnered with Google to launch Codemagic – a mobile-first CI/CD service.

Choosing Unity

Unity’s strength lies in its versatility and cross-platform capabilities. Additionally, it’s very well suited for creating VR and AR apps, and with the announcement of Facebook’s (uh, sorry, Meta’s) Metaverse, VR seems to be the next big thing again.

Codemagic

Codemagic is a continuous integration and continuous delivery (CI/CD) tool that is mostly used for mobile apps. Recently, Codemagic has added Unity CI/CD to its portfolio. Our goal here is to help developers focus on the interesting stuff – developing the game – while automating the boring stuff, like building, testing, and publishing the project.

What are CI/CD and DevOps?

CI/CD is a key part of DevOps, which, in turn, is a methodology (or, you could say, a philosophy). Even though it was originally created for the software development industry, it can be applied in many other cases. The idea behind DevOps is to have one single source of truth for the whole team (a repository) to which the teammates continuously contribute with small improvements. 

Continuous integration basically means constantly adding small improvements and features to that shared repository but keeping it in a working project state. For example, you create a new texture, immediately add it to the repository, and test and build the project so that the next person who works on the project already has access to the new texture and is sure that it’s ready to use.

Continuous delivery means being able to ship the project to your customers at any moment. Using the previous example, if the continuous integration was successful, continuous delivery integrates your texture into the production version of the project. Sometimes people say continuous deployment instead of continuous delivery, and the difference here is basically whether or not hitting the “publish” button is automated. With continuous delivery, a human being manually allows the app to be published. Continuous deployment is a bit more automated, with publishing happening automatically if all the tests went fine.

The Usefulness

Game developers always seem to be overloaded. Also, there’s a lot of waiting and often some magic involved. For the artist, what a Build Engineer does is pure magic. And they have to wait for that magic to happen in order to see the results of their work incorporated into the project. Usually, in a team that does manual releases, not everyone understands how to build. CI/CD solves that problem. Codemagic also solves the problem of delivering the project to the stores. All these processes can be automated so that it takes just a couple of clicks to build and publish the new version to Apple App Store or Google Play.

There are various ways to set up a CI/CD pipeline for Unity. The usual go-to platform is Unity Cloud Build, as it’s cheap and easy to master. But it is also very limited in functionality. It has limited publishing capabilities, and it doesn’t allow you to build complex projects that Unity is just a part of, with the rest being written with some other framework. Finally, it’s hard to debug: Often, a build fails, and you don’t know why.

A different method you can use is setting up your own CI/CD with solutions such as Jenkins. Jenkins is free, can be set up anywhere, and is as functional as you want it to be. But at the same time, it’s very hard to configure, requires a lot of additional tools for testing and publishing, and, worst of all, constant support and maintenance. We get quite a few customers switching from Jenkins to Codemagic because they are simply tired of maintaining it and want something that just works and doesn’t require constant attention.

Codemagic is the golden mean when it comes to setting up a CI/CD pipeline: It’s relatively easy to set up, and it offers significantly broader functionality, such as combining frameworks, looking into detailed build logs, distributing build artifacts to testers or stakeholders, and, finally, publishing. Also, Codemagic relies on infrastructure as code with its YAML configuration, which is very versatile and quite familiar to most developers. It’s the perfect solution if you want to build quickly, publish automatically, and not have to worry too much.

Conclusion

Say that you’re a single all-in-one game developer. You have a workstation that you use to build your projects. How long does an average build take? Twenty minutes? How many times per day do you build? Say, four? This means you’d save 80 minutes per day with Codemagic because, in most cases, you cannot develop while building on the same machine. 

But that’s not all. Let’s say there are two of you, a developer and an artist, and it’s the developer’s job to test and add the assets that the artist produces. How much time does it take the developer to do this, build the project, realize something is wrong with the asset, go back to the artist to inform them, and so on? But what if the artist could do all of that on their own? What if they could add their asset and have the CI/CD solution run tests for them and build the app so that the artist could see how everything looks without talking to the developer at all? This would save time for both of them. 

The more people working on a project, the more time introducing CI/CD can save. Add testers to the equation, and you save even more time because CI/CD lets testers get the fresh version almost immediately after it’s been built. So, for larger projects, a properly configured CI/CD tool such as Codemagic can save weeks, or maybe even months.

You can learn more about Codemagic by visiting their website and reading their blog.

Kevin Suhajda, Solutions Engineer at Nevercode

Interview conducted by Arti Sergeev

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more