tulip-control / floras

Flow-based Reactive Test Synthesis for Autonomous Systems
https://floras.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Cache Spot build files for CI jobs #4

Closed slivingston closed 1 week ago

slivingston commented 1 week ago

Summary

This pull request adds actions/cache to cache the Spot build directory in CI jobs (GitHub Actions). Note that:

GitHub will remove any cache entries that have not been accessed in over 7 days.

Approximately 17 minutes is required to build Spot in GitHub Actions, according to my observations.

Other solutions

action/upload-artifact and action/download-artifact can be used to achieve a retention time of 90 days. This seems to be a hard limit for public repositories. In contrast, the cache solution used in this pull request has retention that extends 7 days more whenever we access it, so is potentially forever.

Tulip CI jobs use artifacts saved to a tag: https://github.com/tulip-control/data/releases/tag/stormpy_dependencies This has worked well and provides a stable reference point: there are no retention limits as far as I know. However, this approach requires manually building and saving the files. In contrast, the cache (solution used in this pull request) automatically rebuilds when the cache key changes. Stormpy and carl require much more time to build than Spot, so from what I remember, actions/cache is not a good solution for those.

In conclusion, I think the actions/cache solution proposed here is best because it balances:

slivingston commented 1 week ago

The first CI build for this PR will create the Spot files cache, so the time benefit will not be obvious until this is merged or until another commit is added to this PR.

You can see the time benefit in the recent CI builds from my temporary fork (from which this pull request originates): https://github.com/slivingston/flowsynth/actions?query=branch%3Aci-cache