unison
unison copied to clipboard
[do not merge] JIT CI better cache invalidation
Overview
From the following discussion: https://github.com/unisonweb/unison/pull/5224#issuecomment-2229409852
Currently the CI cache for the JIT tests misses a few things which might change (and hence break the tests). At the very least they are:
- the template in
ci.yaml
that's used to generate the JIT sources - the actual UCM binary for when running the tests (I think?)
As such, we use hashFiles(..)
to ensure that when those dependencies change the source generation & tests are re-run.
Interesting/controversial decisions
I'm not super familiar with what triggers a rebuild. Is it just the hashes? If so, it seems like we would always want to hash the ucm
binary since we would always want to rerun the tests if our main binary changes?
Also currently because we have the JIT source generation template in ci.yaml
, any (unrelated) change in that file would cause a regeneration of the JIT sources. As such, ideally, we should move the JIT source generation into its own .yaml
file. I haven't looked into that since it would take a bit more time to get familiar with github actions.
We could also remove caching all-together to be on the safe side, but I'm guessing caching was added for a reason. I'm thinking it would mean pulling from @unison/internal
each time which might mean extra bandwidth costs?
Test coverage
n/a - relying on CI
Loose ends
n/a see "interesting/controversial decisions" above