Skip to content

Commit

Permalink
Add --shared-ccache argument to generate_prerelease_script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed May 4, 2021
1 parent f15b1c3 commit 1f7c1c2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ros_buildfarm/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,12 @@ def add_argument_require_gpu_support(parser):
help='GPU acceleration is needed in the build container')


def add_argument_shared_ccache(parser):
parser.add_argument(
'--shared-ccache', action='store_true',
help='User\'s ccache directory is shared in the build container')


def add_argument_skip_cleanup(parser):
parser.add_argument(
'--skip-cleanup', action='store_true',
Expand Down
6 changes: 5 additions & 1 deletion ros_buildfarm/devel_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ def configure_devel_job(
build_targets=None,
dry_run=False,
run_abichecker=None,
require_gpu_support=None):
require_gpu_support=None,
shared_ccache=None):
"""
Configure a single Jenkins devel job.
Expand All @@ -271,6 +272,9 @@ def configure_devel_job(
if build_targets is not None:
build_file.targets = build_targets

if shared_ccache is not None:
build_file.shared_ccache = shared_ccache

if index is None:
index = get_index(config.rosdistro_index_url)
if dist_file is None:
Expand Down
5 changes: 4 additions & 1 deletion scripts/prerelease/generate_prerelease_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from ros_buildfarm.argument import add_argument_os_name
from ros_buildfarm.argument import add_argument_output_dir
from ros_buildfarm.argument import add_argument_rosdistro_name
from ros_buildfarm.argument import add_argument_shared_ccache
from ros_buildfarm.config import get_index as get_config_index
from ros_buildfarm.config import get_release_build_files
from ros_buildfarm.config import get_source_build_files
Expand All @@ -56,6 +57,7 @@ def main(argv=sys.argv[1:]):
add_argument_build_tool(parser)
add_argument_custom_rosdep_update_options(parser)
add_argument_output_dir(parser, required=True)
add_argument_shared_ccache(parser)

group = parser.add_argument_group(
'Repositories in underlay workspace',
Expand Down Expand Up @@ -225,7 +227,8 @@ def beforeInclude(self, *_, **kwargs):
index=index, dist_file=dist_file, dist_cache=dist_cache,
jenkins=False, views=False,
source_repository=source_repository,
build_targets=release_targets_combined)
build_targets=release_targets_combined,
shared_ccache=args.shared_ccache)

templates.template_hooks = None

Expand Down

0 comments on commit 1f7c1c2

Please sign in to comment.