Closed ctittel closed 2 years ago
Hi @ctittel. I've set up an example workflow that shows how you can use actions/cache
with setup-racket
. Installing Racket itself is generally very fast so there's usually no need to cache the Racket installation and caching the packages is pretty straightforward, but it means you can't use the packages:
syntax in setup racket (because it doesn't pass --skip-installed
to raco pkg
) so you have to "manually" install the pacakges.
Hope that helps!
Thanks, it works perfectly! In my case this speeds up the action from ~2m30 in the first run to ~45s in following runs.
Does raco pkg install --auto --skip-installed pollen gregor sugar txexpr
also update packages if there are newer versions available?
No, I don't think it will. I personally like to use racksnaps in my production apps and generate the caching key based on the current catalog I'm using. You could run raco pkg update
after install, but that will end up making requests to the catalog so it may slow things down a bit, but probably not by much.
I've updated the docs to link to the example so I'm going to close this.
Thanks! I added raco pkg update --all
to the action and it works as intended.
The checking for updates adds only about 2 seconds time
My github action yml file includes the following two steps (purpose being that downloading and setting up the dependencies takes ~2 Minutes and I want to speed it up):
The caching part seems to work - after the first run of the action I was informed that 200MB were cached.
On the second run the step
Cache Racket dependencies
reported that 200MB were successfully restored. However, the action got stuck for > 3 Minutes in the stepInstall Racket & dependencies
. I aborted the action and the log ofInstall Racket & dependencies
contains the following:It seems the prompt
"/opt/racket" exists, delete?
appeared and it didn't continue on its own.