Add dependency caching for Python wheel builds to resolve #1161 #1329
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Add comprehensive CI caching to speed up builds (fixes #1161)
Problem
Currently, the Python wheel build process rebuilds Boost, yaml-cpp, and CastXML from source for every Python version (3.10, 3.11, 3.12, 3.13) on every platform (Linux x86_64, Linux ARM64, macOS x86, macOS ARM64) on every CI run. Additionally, the main build & test workflow rebuilds everything from scratch on every push/PR. This results in unnecessarily long CI times.
Solution
This PR implements dependency caching for Python wheel builds (resolving issue #1161) and extends comprehensive caching to the build & test workflow to significantly reduce CI build times.
Expected Impact
Wheel Builds
Build & Test (PR/Push)
Changes Made
1.
.github/workflows/wheels.yaml:deps-{platform}-boost-{version}-yaml-{version}-castxml-{version}2.
.github/workflows/before_build.sh:install_boost(),install_yaml_cpp(), andinstall_castxml()functions to check for cached dependenciesOMPL_DEPS_CACHE_DIRenvironment variable3.
.github/workflows/build.yml:Comprehensive caching for the main build & test workflow.
What's cached:
a. ccache
hendrikmuhs/[email protected]CMAKE_C_COMPILER_LAUNCHERandCMAKE_CXX_COMPILER_LAUNCHERb. CMake build artifacts
CMakeLists.txtandsrc/**changesc. Package manager caches
/var/cache/apt)HOMEBREW_NO_AUTO_UPDATE=1to disable auto-updateHOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1to speed up installsAdvantages
Technical Details
Cache Keys
All caches use
restore-keysfor partial matches to maximize cache hit rates.Testing
OMPL_DEPS_CACHE_DIRsetRelated Issues
Fixes #1161
Files Changed
.github/workflows/wheels.yaml- Python wheel caching.github/workflows/before_build.sh- Dependency caching logic.github/workflows/build.yml- Build & test caching