Chore: Refactor CI and add auto cache cleanup mechanisms
- Refactor the Jenkins file to remove parallel stages.
- Implement Bazel cache cleanup mechanisms to manage cache size effectively:
- Clean up Bazel caches when the cache size exceeds 30 GB.
- Due to limitations in Bazel, it is not possible to clean up cache based on time.
- Bazel does not provide a built-in method to identify time-based cache contents.
- Searching by modified date is ineffective because the downloaded artifacts are shared between builds and their modified dates are not updated.
- Partial cache removal is avoided to prevent broken caches.
- The implemented approach is to completely remove all caches (similar to
bazel clean --expunge
) when the cache size threshold is exceeded. This ensures a clean cache environment.
Edited by Xiao Pan