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.
Sharing ccache between builds via docker volume mounting was made optional and off by default in #844.
Part of the reasoning behind that was due to the possibility for deleterious interaction between different jobs via the host's ccache directory.
Long term, I'd actually like to explore using something like sccache to enable caching across multiple hosts but in the current state that would only widen the blast radius.
I've started with devel jobs which, along with ci jobs, are most affected by the removal of a shared ccache since each job builds once to install and once to test. If this reviews well I'll figure out the best way to spread this out among the other job types.
This would allow us to re-enable ccache for builds since each job could only affect its own ccache directory.
As an aside, I'd really like to find a way to improve the readability of the shell snippets.
Joining an array of strings with newlines is a cute solution to keep things inline but the mix of quoting, escaping, and conditional logic with empy templates and python strings is courting disaster and I'd like to take the pulse on a refactor which either moves the script contents into f-strings (now that our oldest supported platform, Focal, supports them) or into separate empy files entirely.
As a further aside, I'd rather not actually use subdirectories of
~/.ccache
since on a non-dedicated host (such as my local workstation) this use of ~/.ccache conflicts with the default use of that directory. I'll propose$XDG_CACHE_HOME/ros_buildfarm/ccache/$job_name
.Using rclcpp on my local workstation as a case study.
Build 1
build-and-install
colcon build
step: 1min 22sbuild-and-test
colcon build
step: 7min 24sBuild 2 (using the same ccache directory)
build-and-install
colcon build
step: 6.07sbuild-and-test
colcon build
step: 40.4s