I’ve got a few builds set up on the beta cloud build site and I’ve noticed that my builds are all taking about 50-90 minutes each time.
I’ve noticed that every single build gives this message in the log:
I suspect this is why it’s taking so long. I can manually make builds myself (in the Editor on my PC) in a matter of just a few minutes, but having to rebuild the library (due to switching platforms, for example) can take a very long time.
Am I doing something wrong that’s causing the library cache to be erased every time?
More info: This is a mercurial repository building from a non-default branch.
Log into your project’s page and make sure that the “Cache” setting is set to “Cache Library Directory”.
This setting isn’t exposed on the build-beta website yet, so visit the base Cloud Build site: https://build.cloud.unity3d.com/ - find your project, go to the settings tab, click on “Edit Project Data”.
It’s already configured that way. I’ve just sent you a PM with a link. Thanks!
As an aside, it seems that on the beta site the cache library setting is visible in the individual Target “Basic Info” section. But as you said the ability to change the setting isn’t exposed on the beta site.
Library cache retrieval/storage should work for these projects on the beta site now. You will need to successfully build a target for the library to be cached appropriately, from which point that cache will be retrieved/used for subsequent builds. You will note messages in your build log similar to the ones below when the cache has been successfully retrieved:
21: Download of cache file library_latest5 finished, size is 45846939 bytes
22: Library successfully restored from remote cache
I have just encountered this issue. All my build logs say:
No Library cache found - ALL assets will be re-imported.
They also restart frequently. It takes average of 2 hours!!! to complete the build. This is killing my productivity and it’s another time when Unity turned out to be very unreliable
You can submit a support ticket for this if you have a project where it replicates. However I had a quick look through your projects and could not find any cases where this happened to you. Remember that you will not have a library cache if it is a clean build, your first build for a given build target, or if you are downgrading your Unity version from the previous build of that target.
@victorw Are you sure it is only when downgrading?
This issue just happened to me after an upgrade.
And not even an upgrade on my project, just an upgrade caused by the fact that Unity Cloud Build didn’t have the most recent installation to match my ProjectVersion.txt at the moment that I made the first build.
(I hope the issue is just due to the upgrade, since I just started using Unity Cloud Build and I have only made 2 builds so far. I will post an update once I make the third build.)
My first successful build had this relevant logs:
36: GIT: Current revision is 7ca2e2534c6c7e0c497579a04ba0796a0aa4be60
37: Detected last used Unity version from ProjectVersion.txt: 2020.3.1f1
(...)
46: No Library cache found - ALL assets will be re-imported.
47: + Building with Unity installed at /Volumes/2020_3_0f1/Unity.app/Contents/MacOS/Unity
(...)
13258: Zipping cache files from Library
13259: done.
13260: publishing finished successfully.
Notice how the it used the 2020_3_0f1 despite having 2020.3.1f1 defined in the ProjectVersion.txt, presumably because Unity Cloud Build still did not have the 2020.3.1f1 installed yet.
And then the second build had this relevant logs:
36: GIT: Current revision is a53ed698c543dc346f790264050309217d55d2a7
37: GIT: Get changeset between 7ca2e2534c6c7e0c497579a04ba0796a0aa4be60 and a53ed698c543dc346f790264050309217d55d2a7 (max 30)
38: Detected last used Unity version from ProjectVersion.txt: 2020.3.1f1
(...)
47: No Library cache found - ALL assets will be re-imported.
48: + Building with Unity installed at /Volumes/2020_3_1f1/Unity.app/Contents/MacOS/Unity
(...)
15882: Zipping cache files from Library
15883: done.
15884: WARNING: Unity Version is different from previous build.
15885: publishing finished successfully.
Notice how this time it used the 2020_3_1f1 which now matches the version defined in the ProjectVersion.txt.
It still says no Library cache found.
In the end issues a warning about the version being different from previous build.