Hello,
We have a mid sized project that we recently tried Unity Build Automation on. It’s a VR project that builds for Android. Our workspace is 9.4 gb, as reported by Unity. Our APK comes out to 700 mb.
On my local machine, incremental builds take 1:58 (one minute, 58 seconds). However, on Unity Build Automation, they take 42 minutes to 44 minutes. One of our goals for build automation is to speed up the process of a developer creating an APK (2 min), uploading it to the cloud (20 minutes), and having another team member download the build (~1 or 2 minutes). Unfortunately, with build times of 40+ minutes, it’s a time-loss for us.
I understand cloud builds are expected to be slower than local builds, but the degree of slowness is concerning (especially when we are paying by the minute).
I went to investigate and found a few strange things:
[2023-04-01T05:21:09.283Z] - 7.3.3.2.4.2 - INFO: ++++++++++++++++++++ SECTION ++++++++++++++++++++
[2023-04-01T05:21:09.283Z] - 7.3.3.2.4.2 - INFO: + Checking out Source Code
[2023-04-01T05:21:09.283Z] - 7.3.3.2.4.2 - INFO: ++++++++++++++++++++ SECTION ++++++++++++++++++++
[2023-04-01T05:21:10.384Z] - 7.3.3.2.4.2 - INFO: BVR: SCM Checkout
[2023-04-01T05:21:10.387Z] - 7.3.3.2.4.2 - INFO: GIT: Checkout project with depth of -1...
[2023-04-01T05:21:10.617Z] - 7.3.3.2.4.2 - INFO: GIT: git version (2.31.1)
[2023-04-01T05:21:10.617Z] - 7.3.3.2.4.2 - INFO: GIT: Checking out git@git.assembla.com:xxxxxxxxxxxx.git/master with depth of -1
[2023-04-01T05:21:10.765Z] - 7.3.3.2.4.2 - INFO: Attempt 1 of 5 to clone repository.
[2023-04-01T05:31:46.456Z] - 7.3.3.2.4.2 - INFO: Cloned in 635 seconds.
Incremental pulls of the project seem to take a full 10 minutes. This project was already checked out and built several times. (the first build took 3.5 hours, so I’m fairly confident it’s not doing a clean checkout here). The use of the word “clone” and “Checkout” muddies the waters here a bit.
As a point of comparison, a “git pull” on my local computer completes in 1.28 seconds.
It also automatically compresses and decompresses the library between builds.
Extracting and restoring the library from the remote cache takes 3 minutes. Compressing the library takes 14 minutes. The APK is built but inaccessible until this step is completed.
[2023-04-01T05:49:06.063Z] - 7.3.3.2.4.2 - INFO: Zipping cache files from Library
[2023-04-01T06:03:08.834Z] - 7.3.3.2.4.2 - INFO: Created the archive file.
The actual build time recorded on the cloud is 5 minutes, which is pretty close to the local 2 minutes… but there’s just an extra 35 minutes of “other stuff” that we get billed for and adds a lot of dead time to our team’s dev cycles. More concurrency isn’t really helpful for us.
Since this extra library compression and decompression takes so much time:
($0.02 * (14 +3)) = $0.34, per build
We’d rather pay the Unity rate of $0.14/GB/month to not spend the time compressing our 22gb Library folder. It would pay for itself in just 9 builds per month.
I’m also not sure what’s going on with the source control step taking so long. We were expecting cloud builds to take 2x or 3x the time of our local builds, not 20x. Is there anything that can be done to improve this process for us?
Thank you!

