From 9cb8906b5dd0ab6c3b6ae1cadea10d498a957439 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Tue, 5 Mar 2019 17:52:15 +0000 Subject: [PATCH] Bug 1522581 - Publish GeckoView multi-architecture fat AAR Nightly. r=jlorenzo Differential Revision: https://phabricator.services.mozilla.com/D15774 --HG-- extra : moz-landing-system : lando --- taskcluster/ci/beetmover/kind.yml | 1 + taskcluster/ci/build/android.yml | 72 +++++++++++++++++++ taskcluster/docs/attributes.rst | 11 +++ taskcluster/taskgraph/loader/build_signing.py | 4 +- taskcluster/taskgraph/loader/push_apk.py | 4 +- taskcluster/taskgraph/target_tasks.py | 1 + .../transforms/beetmover_geckoview.py | 1 + 7 files changed, 92 insertions(+), 2 deletions(-) diff --git a/taskcluster/ci/beetmover/kind.yml b/taskcluster/ci/beetmover/kind.yml index 15c98b304d64..5c2cf5fe4049 100644 --- a/taskcluster/ci/beetmover/kind.yml +++ b/taskcluster/ci/beetmover/kind.yml @@ -29,6 +29,7 @@ not-for-build-platforms: - win64-devedition-nightly/opt - linux64-asan-reporter-nightly/opt - win64-asan-reporter-nightly/opt + - android-geckoview-fat-aar-nightly/opt job-template: shipping-phase: promote diff --git a/taskcluster/ci/build/android.yml b/taskcluster/ci/build/android.yml index daf40abfe515..49533b81f29e 100644 --- a/taskcluster/ci/build/android.yml +++ b/taskcluster/ci/build/android.yml @@ -846,3 +846,75 @@ android-geckoview-fat-aar/opt: - linux64-sccache - linux64-nasm - linux64-node + +android-geckoview-fat-aar-nightly/opt: + description: "Android GeckoView multi-architecture fat AAR Nightly" + attributes: + nightly: true + enable-full-crashsymbols: true + disable-push-apk: true + disable-build-signing: true + shipping-phase: build + shipping-product: fennec + index: + product: mobile + job-name: android-geckoview-fat-aar-nightly + type: nightly-with-multi-l10n + treeherder: + platform: android-4-0-geckoview-fat-aar/opt + symbol: Ngv + worker-type: aws-provisioner-v1/gecko-{level}-b-android + dependencies: + android-x86: build-android-x86-nightly/opt + android-x86_64: build-android-x86_64-nightly/opt + android-api-16: build-android-api-16-nightly/opt + android-aarch64: build-android-aarch64-nightly/opt + worker: + docker-image: {in-tree: android-build} + max-run-time: 7200 + env: + # Online in order to download the per-architecture AARs. + GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-online" + TOOLTOOL_MANIFEST: "mobile/android/config/tooltool-manifests/android/releng.manifest" + PERFHERDER_EXTRA_OPTIONS: android-geckoview-fat-aar-nightly + MOZ_ANDROID_FAT_AAR_TARGETS: {artifact-reference: "x86=,\ + x86_64=,\ + armeabi-v7a=,\ + arm64-v8a="} + artifacts: + - name: public/android/maven + # TODO Bug 1433198. Remove the following entry once target.maven.zip is uploaded to a maven repository + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/maven/ + type: directory + - name: public/build/target.maven.zip + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/target.maven.zip + type: file + - name: public/build/geckoview-androidTest.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview/outputs/apk/androidTest/withGeckoBinaries/debug/geckoview-withGeckoBinaries-debug-androidTest.apk + type: file + - name: public/build/geckoview_example.apk + path: /builds/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/geckoview_example/outputs/apk/withGeckoBinaries/debug/geckoview_example-withGeckoBinaries-debug.apk + type: file + - name: public/build + path: /builds/worker/artifacts/ + type: directory + run: + using: mozharness + actions: [get-secrets, build, multi-l10n] + config: + - builds/releng_base_android_64_builds.py + - taskcluster_nightly.py + script: "mozharness/scripts/fx_desktop_build.py" + secrets: true + custom-build-variant-cfg: api-16 + tooltool-downloads: internal + toolchains: + - android-gradle-dependencies + - android-ndk-linux + - android-sdk-linux + - linux64-clang + - linux64-rust-android + - linux64-rust-size + - linux64-cbindgen + - linux64-nasm + - linux64-node diff --git a/taskcluster/docs/attributes.rst b/taskcluster/docs/attributes.rst index af74a2c526c9..f71dcb8568b3 100644 --- a/taskcluster/docs/attributes.rst +++ b/taskcluster/docs/attributes.rst @@ -302,3 +302,14 @@ If a task set this boolean attribute to `true`, it will be processed by the code review bot, the task will ran for every new Phabricator diff. Any supported and detected issue will be automatically reported on the Phabricator revision. + +disable-push-apk +================ +Some GeckoView-only Android tasks produce APKs that shouldn't be +pushed to the Google Play Store. Set this to ``true`` to disable +pushing. + +disable-build-signing +===================== +Some GeckoView-only tasks produce APKs, but not APKs that should be +signed. Set this to ``true`` to disable APK signing. diff --git a/taskcluster/taskgraph/loader/build_signing.py b/taskcluster/taskgraph/loader/build_signing.py index c3efe4148c62..71fcc6fc3a08 100644 --- a/taskcluster/taskgraph/loader/build_signing.py +++ b/taskcluster/taskgraph/loader/build_signing.py @@ -32,4 +32,6 @@ def loader(kind, path, config, params, loaded_tasks): dependent_task = job['primary-dependency'] if dependent_task.attributes.get('nightly') or \ dependent_task.label in NON_NIGHTLY_LABELS_WHICH_SHOULD_SIGN_BUILDS: - yield job + # Bug 1522581: Some GeckoView-only tasks produce APKs that shouldn't be signed. + if not dependent_task.attributes.get('disable-build-signing', False): + yield job diff --git a/taskcluster/taskgraph/loader/push_apk.py b/taskcluster/taskgraph/loader/push_apk.py index 654ab98ac1fb..97a09e484a2e 100644 --- a/taskcluster/taskgraph/loader/push_apk.py +++ b/taskcluster/taskgraph/loader/push_apk.py @@ -35,7 +35,9 @@ def get_dependent_loaded_tasks(config, params, loaded_tasks): ) android_tasks = ( task for task in tasks_with_matching_kind - if task.attributes.get('build_platform', '').startswith('android') + if task.attributes.get('build_platform', '').startswith('android') and + # Bug 1522581: Some GeckoView-only tasks produce APKs that shouldn't be pushed. + not task.attributes.get('disable-push-apk', False) ) # TODO Bug 1368484: Aarch64 is not planned to ride the trains regularly. It may stay on nightly diff --git a/taskcluster/taskgraph/target_tasks.py b/taskcluster/taskgraph/target_tasks.py index f5eae961dcb1..67f8a0745249 100644 --- a/taskcluster/taskgraph/target_tasks.py +++ b/taskcluster/taskgraph/target_tasks.py @@ -454,6 +454,7 @@ def target_tasks_nightly_fennec(full_task_graph, parameters, graph_config): 'android-nightly', 'android-x86-nightly', 'android-x86_64-nightly', + 'android-geckoview-fat-aar-nightly', ): if not task.attributes.get('nightly', False): return False diff --git a/taskcluster/taskgraph/transforms/beetmover_geckoview.py b/taskcluster/taskgraph/transforms/beetmover_geckoview.py index 88831c120f8b..ba18546b027f 100644 --- a/taskcluster/taskgraph/transforms/beetmover_geckoview.py +++ b/taskcluster/taskgraph/transforms/beetmover_geckoview.py @@ -27,6 +27,7 @@ _ARTIFACT_ID_PER_PLATFORM = { 'android-api-16': 'geckoview{update_channel}-armeabi-v7a', 'android-x86': 'geckoview{update_channel}-x86', 'android-x86_64': 'geckoview{update_channel}-x86_64', + 'android-geckoview-fat-aar': 'geckoview', } _MOZ_UPDATE_CHANNEL_PER_BRANCH = {