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 on CI seems to be broken #375

Closed
JacquesCarette opened this issue Jul 5, 2023 · 12 comments · Fixed by #399
Closed

Caching on CI seems to be broken #375

JacquesCarette opened this issue Jul 5, 2023 · 12 comments · Fixed by #399

Comments

@JacquesCarette
Copy link
Collaborator

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
Copy link
Collaborator Author

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

@JacquesCarette
Copy link
Collaborator Author

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

@JasonGross
Copy link
Contributor

Maybe related to actions/cache#624? Also, maybe the cache action should be updated to v3?

@JasonGross
Copy link
Contributor

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

@JacquesCarette
Copy link
Collaborator Author

Thanks - I'll investigate all those.

@JacquesCarette
Copy link
Collaborator Author

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

@JasonGross
Copy link
Contributor

JasonGross commented Aug 7, 2023

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
Copy link
Collaborator Author

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

@Taneb
Copy link
Member

Taneb commented Aug 8, 2023

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

@JacquesCarette
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@JasonGross
Copy link
Contributor

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)

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

Successfully merging a pull request may close this issue.

3 participants