Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching installation #4

Open
Josephksa opened this issue Nov 22, 2021 · 10 comments
Open

Caching installation #4

Josephksa opened this issue Nov 22, 2021 · 10 comments

Comments

@Josephksa
Copy link

Installing Unity takes up to 8 minutes on each workflow run, do you advise caching it?

@javier-cestau
Copy link

I would like to know this as well

@bssughosh
Copy link

Same. Its taking too long for this step to complete

@RubensKj
Copy link

Anybody found a workaround for this?? Just until this issue is finished

@TheoPM
Copy link

TheoPM commented Apr 15, 2023

@RubensKj is actions/cache not suitable?

https://github.com/actions/cache

Considering the Unity installation path is known, surely it could be cached using the above utility.

I guess be careful to also cache Application Support if running on 'Darwin'.

Final thought for Darwin is that you may also need to manually apply execution permissions again once the cache is restored. Example of this can be seen in the 'post install' method.

@RubensKj
Copy link

RubensKj commented Apr 15, 2023

I tried using this cache action, but I don't know all the paths that we need to cache. I tried the Unity installation folder, but it didn't work.

Did you find a way to cache using this action and also works for you??

@TheoPM
Copy link

TheoPM commented Apr 15, 2023

Were you able to achieve a 'cache hit' upon reading the cache?

It is important to remember your cache can only be located if it is on the:

  • default branch (usually main)
  • current branch
  • 'base branch' if the action is executed from a pull_request trigger

My test repo 'default branch' is develop, so I ensure the cache is created on develop, and as a result it is available to all branches. This is useful as all branches in my repo can access the Unity Installation I have cached.

@RubensKj
Copy link

RubensKj commented Apr 15, 2023

Yeap! I cached the entire Unity installation folder (it was about 6gb of cache size), and when I try to used unity command lines (already restore the cache), it gives some random error. Searching for it, it seems to be missing the Microsoft Visual Studio tools, but I don't what i should cache for that.

@RubensKj
Copy link

Can you show a few on how your pipeline works?? I would love to have a look

@TheoPM
Copy link

TheoPM commented Apr 16, 2023

Away from my Mac at the moment, but worth mentioning mine is a Linux installation.

In the meantime you might consider dumping logs of the windows OS program files directories before/after to see what MS VS dirs may be added.

That diff might help you figure out other root directories to cache/restore?

@TristanSpeakEasy
Copy link

If anyone has figured this out and sped things up massively do you mind sharing a snippet of your workflow yaml showing how you set it up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants