Continuous Integration using Unity Cloud Build


 After doing a dev interview with Jason Weimann over at https://unity3d.college/ I had some questions on Twitter about my CI/CD setup (Continuous Integration and Continuous Delivery)

In short I have spent the last year making daily builds 3 times a week with 2 hours a day to work on my game. One thing I needed to make sure I did is not waste any time. This includes making builds in unity. In fact during the time I worked on the project I rarely spent any time building the project. Instead I would have a build the next morning. I would get feedback from other developers and gamers every week by building a cloud build. At first I was uploading the cloud builds to a AWS S3 bucket, however, Unity Cloud build automatically generates a share link for you. It also can automatically post to a discord or other messaging systems when the builds are done.

This was great because I could link the share to others and they could just click and play. I then could watch them via Zoom or other screen share platforms.

When I first set up cloud build I had a GitLab Git repo which then was connected to cloud build. Every push would result in a new build shortly after. After file sizes became an issue I moved to Unity Colab to store code for CI/CD but at the same time used GitLab to keep a higher frequency revision backup of all code. I check every edit in to git but only push to Colab when I want a new build. I push to git at the end of a few commits though integration does not run. When ever I use Colab to publish, it now results in a Web GL build, Mac and Windows builds.


I recommend always getting feedback as often as possible. The most cost effective way of doing this is to have automatic builds so you can create revisions and get more feedback. This lead to a much faster development and feedback cycle. I also found build bugs quickly when upgrading Unity or other packages.


Send me a message on Twitter if you are interested in hearing more!

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.