agda / agda-categories

A new Categories library for Agda
https://agda.github.io/agda-categories
MIT License
366 stars 68 forks source link

Caching on CI seems to be broken #375

Closed JacquesCarette closed 12 months ago

JacquesCarette commented 1 year ago

Last few times, the cache was 45 bytes... Something's definitely quite broken. I'd appreciate some help, as my knowledge in this area is thin (and that's a generous description.)

JacquesCarette commented 1 year ago

Still is broken. It's causing extra slowness in being able to accept PRs.

JacquesCarette commented 1 year ago

Might be related to this issue. And also getting various warnings. Latest cache was also bogus.

JasonGross commented 1 year ago

Maybe related to https://github.com/actions/cache/issues/624? Also, maybe the cache action should be updated to v3?

JasonGross commented 1 year ago

Plausibly the issue is that cabal seems to now be installing to ~/.local/state/cabal instead of ~/.cabal?

JacquesCarette commented 1 year ago

Thanks - I'll investigate all those.

JacquesCarette commented 1 year ago

Didn't mean to close this quite yet, I guess I used the 'wrong' words in my commit!

JasonGross commented 1 year ago

Looks like you might also need to pass --installdir explicitly now, or else cache ~/.local/bin/, because it seems that cabal is stuffing a symlink to the executables in ~/.local/bin, and there aren't anywhere else in the cabal tree except /home/runner/.local/state/cabal/store/ghc-8.6.5/Agda-2.6.3-c7bd11606a8a3dcf5f3eb623c3877b0e1a7a34d151782f77a271cd5a0e48afca/bin/agda?

JacquesCarette commented 1 year ago

Looks like this is now fixed. I'll wait for an independent PR to verify this before closing.

Taneb commented 1 year ago

I merged master into #382. Looks like CI is still not working on PRs

JacquesCarette commented 1 year ago

We've got partial success: the cache is there and has lots of stuff in it, and it is picked up. Part-way there.

Now to make sure the right things are in the path! Looks like various pieces disagree as to where to expect things to be.

JacquesCarette commented 1 year ago

Still not working, sadly. I'm going to have to spend real time on it and test locally first.

JasonGross commented 1 year ago

Replace echo "~/.local/bin" with echo "$HOME/.local/bin" when saving the path. Pass --installdir explicitly to cabal install and make sure it's a directory that's cached. Otherwise you can look at what I had to change to get https://github.com/JasonGross/lawvere/blob/main/.github/workflows/ci.yml working (which I pseudorandomly based off the CI in this repo)