From f42e744422159c7aaacfb9bc164cfc248403b745 Mon Sep 17 00:00:00 2001 From: Mitchell Hentges Date: Tue, 28 May 2019 12:24:06 +0200 Subject: [PATCH] [fenix] Infers release architectures from gradle (https://github.com/mozilla-mobile/fenix/pull/2892) --- automation/taskcluster/decision_task.py | 7 ++++--- automation/taskcluster/lib/gradle.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/automation/taskcluster/decision_task.py b/automation/taskcluster/decision_task.py index 91c1f8d886..ca0b103888 100644 --- a/automation/taskcluster/decision_task.py +++ b/automation/taskcluster/decision_task.py @@ -15,7 +15,7 @@ import re import taskcluster -from lib.gradle import get_debug_variants, get_geckoview_versions +from lib.gradle import get_variants_for_build_type, get_geckoview_versions from lib.tasks import ( fetch_mozharness_task_id, schedule_task_graph, @@ -61,7 +61,7 @@ def pr_or_push(is_push): signing_tasks = {} other_tasks = {} - for variant in get_debug_variants(): + for variant in get_variants_for_build_type('debug'): assemble_task_id = taskcluster.slugId() build_tasks[assemble_task_id] = BUILDER.craft_assemble_task(variant) build_tasks[taskcluster.slugId()] = BUILDER.craft_test_task(variant) @@ -107,7 +107,8 @@ def raptor(is_staging): def release(track, is_staging, version_name): - architectures = ['x86', 'arm', 'aarch64'] + variants = get_variants_for_build_type(track) + architectures = [variant.abi for variant in variants] apk_paths = ["public/target.{}.apk".format(arch) for arch in architectures] build_tasks = {} diff --git a/automation/taskcluster/lib/gradle.py b/automation/taskcluster/lib/gradle.py index e0ff24437b..69b3fb5d15 100644 --- a/automation/taskcluster/lib/gradle.py +++ b/automation/taskcluster/lib/gradle.py @@ -9,7 +9,7 @@ import subprocess from lib.variant import Variant -def get_debug_variants(): +def get_variants_for_build_type(build_type): print("Fetching build variants from gradle") output = _run_gradle_process('printBuildVariants') content = _extract_content_from_command_output(output, prefix='variants: ') @@ -21,7 +21,7 @@ def get_debug_variants(): print("Got variants: {}".format(variants)) return [Variant(variant_dict['name'], variant_dict['abi'], variant_dict['isSigned'], variant_dict['buildType']) for variant_dict in variants - if variant_dict['buildType'] == 'debug'] + if variant_dict['buildType'] == build_type] def get_geckoview_versions():