Can this action be cached / sped up?
stefanhendriks opened this issue · 7 comments
I am not as proficient with Github Actions, so forgive me for asking if this is a trivial thing.
For my project, I use this awesome action and it works as expected (Installs MinGW32 bit version). However, it takes 8-9 minutes to install MinGW. I was wondering if this step could be cached, as this step is everytime the same?
See also:
https://github.com/stefanhendriks/Dune-II---The-Maker/runs/4582880457?check_suite_focus=true
And the yml
file:
https://github.com/stefanhendriks/Dune-II---The-Maker/blob/master/.github/workflows/build_cmake.yml
I added a cache step in this PR; https://github.com/stefanhendriks/Dune-II---The-Maker/runs/4608468014?check_suite_focus=true
however, it only shaves off 1 minute orso. Looks like the uninstall mingw
step takes a long time. Not sure why/how this can be sped up. If you have any suggestions, please let me know :)
Hello. First of all, thanks for brining this up. Sorry for the delay, I'm just completely swamped with work. I'll take a look now.
Awesome, thanks!.
FYI: Just saw another PR taking 14 minutes with MinGW.
Maybe it has something todo with me needing a 32bit version? Anyway, any suggestion is welcome.
With the GH cache PR , I have a consistent ~ 8 minute build (so no builds taking longer). So I guess it is all now relying on the whole uninstalling thing I think.
I found this in the github actions documentation. https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
I was able to get caching working as expected, I forked this action, and allowed for custom versions of mingwtoolchain to be used. Here is a skipped cache run. https://github.com/coffeebe4code/cons/runs/7588745986?check_suite_focus=true
Here is the usage. https://github.com/coffeebe4code/cons/blob/main/.github/workflows/ci.yml
I think using a method other than Chocolatey could help improve run speed. It seems like Chocolatey slows down any action of which it is a part.