Skip to content

Preserve caches during git-clean

André Anjos requested to merge preserve-caches into master

This MR introduces a fix to the bdt clean command, preserving pre-commit and torch caches so the gitlab-runner can actually store them. Otherwise, .cache directories are removed and not cached between builds. You can see that already happening in some examples, despite running pre-commit (at least):

That said, IDK if using the after_script section of bootstrap wouldn't be cleverer to carry on the bdt clean operation. It is run no matter what. The second point is that we should probably list what to keep on the CI file itself. Currently, things to cache are defined on the CI file, whereas what to clean defined in a Python file. At least by moving what to clean into the CI file everything would be defined in a single easy to maintain place.

Edited by André Anjos

Merge request reports