Bug 1690870 - Stop getting artifacts for host binaries. r=firefox-build-system-reviewers,andi

Ever since all builds we get artifacts from have been cross-compiled, those
artifacts have been for Linux. They are not of any use on Mac or Windows hosts,
so it's unnecessary to get them. And we might as well be consistent across
platforms, and not get them on Linux either, even if they are native.

Differential Revision: https://phabricator.services.mozilla.com/D129790
This commit is contained in:
Mike Hommey 2021-10-28 10:24:52 +00:00
Родитель 3cbc9abc45
Коммит dfacf7c003
3 изменённых файлов: 1 добавлений и 40 удалений

Просмотреть файл

@ -110,12 +110,8 @@ ifdef BUILD_VERBOSE_LOG
verbose_flag = -v
endif
# Host binaries are not produced for macOS consumers: that is, there's
# no macOS-hosted job to produce them at this time. Therefore we
# enable --host-bins only for automation builds, which only require Linux and
# Windows host binaries.
recurse_artifact:
$(PYTHON3) $(topsrcdir)/mach --log-no-times artifact install$(if $(MOZ_ARTIFACT_BUILD_SYMBOLS), --symbols$(addprefix =,$(filter full,$(MOZ_ARTIFACT_BUILD_SYMBOLS))))$(if $(MOZ_AUTOMATION), --host-bins) $(verbose_flag)
$(PYTHON3) $(topsrcdir)/mach --log-no-times artifact install$(if $(MOZ_ARTIFACT_BUILD_SYMBOLS), --symbols$(addprefix =,$(filter full,$(MOZ_ARTIFACT_BUILD_SYMBOLS)))) $(verbose_flag)
ifdef MOZ_EME_WIN32_ARTIFACT
recurse_win32-artifact:

Просмотреть файл

@ -85,7 +85,6 @@ def _make_artifacts(
skip_cache=False,
download_tests=True,
download_symbols=False,
download_host_bins=False,
download_maven_zip=False,
no_process=False,
):
@ -108,8 +107,6 @@ def _make_artifacts(
raise ValueError("--maven-zip requires --no-tests")
if download_symbols:
raise ValueError("--maven-zip requires no --symbols")
if download_host_bins:
raise ValueError("--maven-zip requires no --host-bins")
if not no_process:
raise ValueError("--maven-zip requires --no-process")
@ -128,7 +125,6 @@ def _make_artifacts(
topsrcdir=topsrcdir,
download_tests=download_tests,
download_symbols=download_symbols,
download_host_bins=download_host_bins,
download_maven_zip=download_maven_zip,
no_process=no_process,
mozbuild=command_context,
@ -155,7 +151,6 @@ def _make_artifacts(
)
@CommandArgument("--no-tests", action="store_true", help="Don't install tests.")
@CommandArgument("--symbols", nargs="?", action=SymbolsAction, help="Download symbols.")
@CommandArgument("--host-bins", action="store_true", help="Download host binaries.")
@CommandArgument("--distdir", help="Where to install artifacts to.")
@CommandArgument(
"--no-process",
@ -174,7 +169,6 @@ def artifact_install(
verbose=False,
no_tests=False,
symbols=False,
host_bins=False,
distdir=None,
no_process=False,
maven_zip=False,
@ -187,7 +181,6 @@ def artifact_install(
skip_cache=skip_cache,
download_tests=not no_tests,
download_symbols=symbols,
download_host_bins=host_bins,
download_maven_zip=maven_zip,
no_process=no_process,
)

Просмотреть файл

@ -142,7 +142,6 @@ class ArtifactJob(object):
log=None,
download_tests=True,
download_symbols=False,
download_host_bins=False,
download_maven_zip=False,
substs=None,
mozbuild=None,
@ -153,11 +152,6 @@ class ArtifactJob(object):
self._tests_re = re.compile(
r"public/build/(en-US/)?target\.common\.tests\.(zip|tar\.gz)"
)
self._host_bins_re = None
if download_host_bins:
self._host_bins_re = re.compile(
r"public/build/host/bin/(mar|mbsdiff)(.exe)?"
)
self._maven_zip_re = None
if download_maven_zip:
self._maven_zip_re = re.compile(r"public/build/target\.maven\.zip")
@ -189,8 +183,6 @@ class ArtifactJob(object):
continue
elif self._package_re and self._package_re.match(name):
yield name
elif self._host_bins_re and self._host_bins_re.match(name):
yield name
elif self._tests_re and self._tests_re.match(name):
tests_artifact = name
yield name
@ -225,15 +217,6 @@ class ArtifactJob(object):
self._symbols_archive_suffix
):
return self.process_symbols_archive(filename, processed_filename)
if self._host_bins_re:
# Turn 'HASH-mar.exe' into 'mar.exe'. `filename` is a path on disk
# without the full path to the artifact, so we must reconstruct
# that path here.
orig_basename = os.path.basename(filename).split("-", 1)[1]
if self._host_bins_re.match(
"public/build/host/bin/{}".format(orig_basename)
):
return self.process_host_bin(filename, processed_filename)
return self.process_package_artifact(filename, processed_filename)
def process_package_artifact(self, filename, processed_filename):
@ -385,15 +368,6 @@ class ArtifactJob(object):
)
writer.add(destpath.encode("utf-8"), entry)
def process_host_bin(self, filename, processed_filename):
with JarWriter(file=processed_filename, compress_level=5) as writer:
# Turn 'HASH-mar.exe' into 'mar.exe'. `filename` is a path on disk
# without any of the path parts of the artifact, so we must inject
# the desired `host/bin` prefix here.
orig_basename = os.path.basename(filename).split("-", 1)[1]
destpath = mozpath.join("host/bin", orig_basename)
writer.add(destpath.encode("utf-8"), open(filename, "rb"))
def iter_artifact_archive(self, filename):
if filename.endswith(".zip"):
reader = JarReader(filename)
@ -999,7 +973,6 @@ class Artifacts(object):
topsrcdir=None,
download_tests=True,
download_symbols=False,
download_host_bins=False,
download_maven_zip=False,
no_process=False,
mozbuild=None,
@ -1028,7 +1001,6 @@ class Artifacts(object):
log=self._log,
download_tests=download_tests,
download_symbols=download_symbols,
download_host_bins=download_host_bins,
download_maven_zip=download_maven_zip,
substs=self._substs,
mozbuild=mozbuild,