industrial_ci
industrial_ci copied to clipboard
CCACHE_SIZE enviroment variable
It would be useful to be able to set the CCACHE_SIZE environment variable for reducing the size of the cache sometimes.
At first I thought that this is a variable that ccache support directly, but I guess it has to be set explicitly.
It would be great, if you could create a PR and test it.
Instead of adding it everywhere, I would suggest a new function in workspace.sh:
function ici_setup_ccache() {
if [ -n "$CCACHE_DIR" ]; then
ici_run "setup_ccache" ici_apt_install ccache
export PATH="/usr/lib/ccache:$PATH"
if [ -n "$CCACHE_SIZE" ]; then
ccache --set-config=max_size="$CCACHE_SIZE"
fi
fi
}
(not tested)
CCACHE_SIZE
needs to be added in docker.env as well...
Basically the reason for wanting this feature is debug builds can create a huge ccache that can fill up storage and you get still get a large benefit by setting it to something small-ish (but still big enough for anything you are going to get a hit on) (like 500mb) so it cleans out the old stuff sooner.
I'll try to submit a PR for this soon. I'm sorry if I've been bothering you with all my issues. GitHub Actions seems to be performing much better than it did last November when I last tested it which means I am converting much of the ros-planning repos (hopefully moveit/moveit2 also) to using industrial_ci on GitHub Actions.
One thing cool I discovered tonight is I can cache entire workspaces so I'm experimenting with caching both the upstream and target workspace. Here is my current working copy of the moveit2 yaml: https://github.com/tylerjw/moveit2/blob/test-industrial-ci/.github/workflows/industrial_ci_action.yml