opentitan
opentitan copied to clipboard
[ci] Better bitstream build cache filtering
We want to avoid rebuilding bitstreams if possible. To do this we look at the list of changed files and determine if a rebuild is warranted.
Currently the filtering is entirely hardcoded rules. This PR uses Bazel to get a list of dependencies required for the bitstream, and filter the changes based on that list.
Hi @nbdd0121! Is this still something that we should be doing? It looks sensible to me: maybe it's worth rebasing?
I think I still want to pursue this, but it's unlikely that this could be merged before the quiet period, so I'll defer this to a later date.
Apparently now building the bitstream does not require opentitanlib, so we can now ask Bazel to find dependencies and do extra filter on top without too much faff.