Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Library cache being rebuilt every single time.

Discussion in 'Unity Cloud Build' started by Deozaan, Sep 30, 2015.

  1. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    670
    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.
     
    tigerleapgorge likes this.
  2. patrickc

    patrickc

    Unity Technologies

    Joined:
    Jan 23, 2015
    Posts:
    67
    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 should look like this: https://www.dropbox.com/s/zycxaivcipjtkle/Screenshot 2015-09-30 09.43.39.png?dl=0

    If that doesn't help, send me a direct message with a link to your project.

    Cheers,
    Patrick
     
  3. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    670
    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.
     
  4. canexplode

    canexplode

    Joined:
    Sep 4, 2014
    Posts:
    2
    We have the same problem as described above. I've just sent you a PM as well.
     
    tigerleapgorge likes this.
  5. patrickc

    patrickc

    Unity Technologies

    Joined:
    Jan 23, 2015
    Posts:
    67
    Thanks, y'all. We're investigating.

    Cheers,
    Patrick
     
    tigerleapgorge likes this.
  6. unitychrism

    unitychrism

    Unity Technologies

    Joined:
    Sep 16, 2015
    Posts:
    122
    Deozaan/canexplode,

    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​

    Please let me know if you run into any issues.

    Regards,
    -Chris
     
    tigerleapgorge likes this.
  7. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    670
    It seems to be working. Thanks!
     
  8. mmoczkowski

    mmoczkowski

    Joined:
    Oct 25, 2012
    Posts:
    6
    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
     

    Attached Files:

    tigerleapgorge likes this.
  9. jacobgmartin

    jacobgmartin

    Joined:
    Sep 10, 2015
    Posts:
    36
    I have the same problem. The builds are set to use the Library Cache.

    Yet, three successive builds and the library cache is not found each time.


    I'm building against Unity 5.2.2f1.

    Here's some log stuff:

    4: BUILDJOB_CACHE=library
    15: BUILD_PLATFORM=standalonelinux64
    16: CLEANUP_WORKSPACE=true
    17: SANDBOX_BUILD_USER=true
    18: Calculated Workspace Size: 106.71 MiB
    19: PATH | SIZE
    20: /.vscode | 1.14 kiB
    21: /AssetBundles | 25.53 MiB
    22: /Assets | 81.08 MiB
    23: /ProjectSettings | 100.30 kiB
    24: postcheckoutstatus finished successfully.
    25: Added new build target 'default-linux-desktop-64-bit'
    26: Saved /BUILD_PATH/XXXX.languagersvp.default-linux-desktop-64-bit/build.json
    27: No Library cache found - ALL assets will be re-imported.
    28: * detecting buildpack... done
    29: = name: unity
    30: = display: Unity
    31: * compiling...
    32: + Environment config:
    33: LOG_VERBOSE=1
    34: BUILDCFG_TARGET=default-linux-desktop-64-bit
    35: ENABLE_LIBRARY_CACHE=1
    36: + Detecting Unity installation ...
    37: + Building with Unity installed at /UNITY_PATH/Unity/Unity-5_2_2f1/Unity.app/Contents/MacOS/Unity
    38: + Installing UnityCloud build tools
    39: Injecting custom Scripting Define Symbols 'UNITY_CLOUD_BUILD'
    40: + Switching Unity to target platform
    41: [Unity] Initialize mono
    42: [Unity] Mono path[0] = '/UNITY_PATH/Unity/Unity-5_2_2f1/Unity.app/Contents/Frameworks/Managed'
    43: [Unity] Mono path[1] = '/UNITY_PATH/Unity/Unity-5_2_2f1/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0'
    44: [Unity] Mono config path = '/UNITY_PATH/Unity/Unity-5_2_2f1/Unity.app/Contents/Frameworks/Mono/etc'
    45: [Unity] Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:56343
    46: [Unity] BATCHMODE ARGUMENTS:
    47: [Unity] /UNITY_PATH/Unity/Unity-5_2_2f1/Unity.app/Contents/MacOS/Unity
    48: [Unity] -batchmode
    49: [Unity] -skipMissingProjectID
    50: [Unity] -skipMissingUPID
    51: [Unity] -projectPath
    52: [Unity] /BUILD_PATH/XXXX.languagersvp.default-linux-desktop-64-bit
    53: [Unity] -logFile
    54: [Unity] -buildconfig
    55: [Unity] -bvrbuildtarget
    56: [Unity] default-linux-desktop-64-bit
    57: [Unity] -buildTarget
    58: [Unity] standalonelinux64
    59: [Unity] -quit
    60: [Unity] Successfully changed project path to: /BUILD_PATH/XXXX.languagersvp.default-linux-desktop-64-bit
    61: [Unity] /BUILD_PATH/XXXX.languagersvp.default-linux-desktop-64-bit
    62: [Unity] Rebuilding Library because the asset database could not be found!
    63: [Unity] Audio: FMOD Profiler initialized on port 54900
    64: [Unity] Loading GUID <-> Path mappings...0.000057 seconds
    65: [Unity] Loading Asset Database...0.000009 seconds
    66: [Unity] AssetDatabase consistency checks...0.000118 seconds
    67: [Unity] Initialize engine version: 5.2.2f1 (3757309da7e7)

    Interestingly, at the end of each build the "Library" directory does not seem to be accessible from an "ls" command. Perhaps this is part the problem?

    publishing finished successfully.
    96522: postbuildstatus finished successfully.
    96523: ls: Library: Permission denied
    96524: Deleting project workspace...
    96525: Finished: SUCCESS
     
    tigerleapgorge likes this.
unityunity