-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Centralized caching workflow #2419
Conversation
63573e1
to
52118df
Compare
Cache for
That is So introducing dependency caching already as is - uses |
The first successful caching happened in: https://github.com/haskell/haskell-language-server/runs/4369337368?check_suite_focus=true. Further builds are cache reuse. |
371e75a
to
ca0faab
Compare
ca0faab
to
418688f
Compare
418688f
to
b0621d7
Compare
@@ -0,0 +1,121 @@ | |||
name: Caching of dependencies | |||
|
|||
# 2021-11-30: NOTE: This workflow currently a trimmed copy of a main `test.yml` workflow. Workflows need further deduplication: https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little bit worried too by the duplication between this and the test workflow (to the already existing duplication with the build workflow). But well we can tackle it in next pr's
Will take a look to the link you provided to see how can we remove it
have you planned working on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, many thanks for helping to improve ci
Not related at all with this pr but the nix build in master has failed with
so i guess some hackage change has triggered it? the nix build soes not use the pinned hackage index from cabal.project? //cc @maralorn @michaelpj |
EDITED: we are building an older release 0.10.1 which seems to be not compatible with ghc-9.0.1 |
Thank you also. It is highly motivating to get work accepted & get maintainer notes on what can be made further. Would take another round on CI code. |
* CI: add workflow to cache build dependencies * delete this pull request push trigger before
Discussed in: https://matrix.to/#/!oOjZFsoNYPAbTEgSOA:libera.chat/$ckv7h8SSMbimsa_5pCaCFn2uMm_nEVIy6gy0QyFgc8M?via=libera.chat&via=matrix.org&via=monoid.al
Short: Cabal builds deps from the source. Currently, cache gets saved only on the successful passing of the CI workflow pipeline (includes dependencies built, then all HLS projects built & then successful passing of all tests, core word is "successful" passing of all of that), while successful Cabal dependency build stage depends only on does Hackage snapshot state (success of Cabal dependency build stage).
Basic idea - is to run
cabal v2-build --only-dependencies
, which would ensure saving & sharing of the snapshot of successfully built dependencies into pull requests. To run on schedule & onpush
tomaster
.