зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1528155 - Use sparse profiles in Windows toolchain tasks. r=tomprince
Also fix support_vcs_checkout call for docker-image based toolchain tasks. Differential Revision: https://phabricator.services.mozilla.com/D19912
This commit is contained in:
Родитель
d1f7bf195d
Коммит
c76df24e8c
|
@ -160,7 +160,8 @@ def support_vcs_checkout(config, job, taskdesc, sparse=False):
|
|||
taskdesc['worker']['taskcluster-proxy'] = True
|
||||
|
||||
|
||||
def generic_worker_hg_commands(base_repo, head_repo, head_rev, path):
|
||||
def generic_worker_hg_commands(base_repo, head_repo, head_rev, path,
|
||||
sparse_profile=None):
|
||||
"""Obtain commands needed to obtain a Mercurial checkout on generic-worker.
|
||||
|
||||
Returns two command strings. One performs the checkout. Another logs.
|
||||
|
@ -172,9 +173,16 @@ def generic_worker_hg_commands(base_repo, head_repo, head_rev, path):
|
|||
'--purge',
|
||||
'--upstream', base_repo,
|
||||
'--revision', head_rev,
|
||||
]
|
||||
|
||||
if sparse_profile:
|
||||
args.extend(['--config', 'extensions.sparse='])
|
||||
args.extend(['--sparseprofile', sparse_profile])
|
||||
|
||||
args.extend([
|
||||
head_repo,
|
||||
path,
|
||||
]
|
||||
])
|
||||
|
||||
logging_args = [
|
||||
b":: TinderboxPrint:<a href={source_repo}/rev/{revision} "
|
||||
|
|
|
@ -123,7 +123,7 @@ def docker_worker_toolchain(config, job, taskdesc):
|
|||
if not any(artifact.get('name') == 'public/build' for artifact in artifacts):
|
||||
docker_worker_add_artifacts(config, job, taskdesc)
|
||||
|
||||
support_vcs_checkout(config, job, taskdesc, sparse=True)
|
||||
support_vcs_checkout(config, job, taskdesc, sparse=('sparse-profile' in run))
|
||||
|
||||
# Toolchain checkouts don't live under {workdir}/checkouts
|
||||
workspace = '{workdir}/workspace/build'.format(**run)
|
||||
|
@ -197,7 +197,7 @@ def windows_toolchain(config, job, taskdesc):
|
|||
}]
|
||||
worker['chain-of-trust'] = True
|
||||
|
||||
support_vcs_checkout(config, job, taskdesc)
|
||||
support_vcs_checkout(config, job, taskdesc, sparse=('sparse-profile' in run))
|
||||
|
||||
env = worker['env']
|
||||
env.update({
|
||||
|
@ -206,11 +206,15 @@ def windows_toolchain(config, job, taskdesc):
|
|||
'MOZ_AUTOMATION': '1',
|
||||
})
|
||||
|
||||
sparse_profile = run.get('sparse-profile')
|
||||
if sparse_profile:
|
||||
sparse_profile = 'build/sparse-profiles/{}'.format(run['sparse-profile'])
|
||||
|
||||
hg_command = generic_worker_hg_commands(
|
||||
'https://hg.mozilla.org/mozilla-unified',
|
||||
env['GECKO_HEAD_REPOSITORY'],
|
||||
env['GECKO_HEAD_REV'],
|
||||
r'.\build\src')[0]
|
||||
r'.\build\src', sparse_profile=sparse_profile)[0]
|
||||
|
||||
# Use `mach` to invoke python scripts so in-tree libraries are available.
|
||||
if run['script'].endswith('.py'):
|
||||
|
|
Загрузка…
Ссылка в новой задаче