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

Better CI caching #203

Merged
merged 6 commits into from
Jan 7, 2024
Merged

Better CI caching #203

merged 6 commits into from
Jan 7, 2024

Conversation

samhh
Copy link
Member

@samhh samhh commented Dec 16, 2023

This PR fixes the Cabal store cache, adds cache restore keys, splits TypeScript dependencies into their own Nix shell, and adds caching of incremental build artifacts.

Building is reduced from ~5 mins to ~1 min 30s. A CI run with changed code and dependencies should be expected to run somewhere between these two numbers, utilising partial caches. The TypeScript typechecking job is also reduced from ~60s to ~20s

This should work as of GHC 9.4. This is largely
based upon:
  https://harry.garrood.me/blog/easy-incremental-haskell-ci-builds-with-ghc-9.4/

I've omitted the GHC version for simplicity.
For CI testing.
Newer versions of Cabal no longer use ~/.cabal/
unless it's already present (XDG).
@samhh samhh marked this pull request as ready for review December 16, 2023 16:32
@samhh samhh requested a review from a team as a code owner December 16, 2023 16:32
@samhh samhh requested a review from astlouisf December 16, 2023 16:32
@samhh samhh merged commit 23f78cb into master Jan 7, 2024
6 checks passed
@samhh samhh deleted the better-ci-caching branch January 7, 2024 20:48
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 this pull request may close these issues.

1 participant