From 6336a4cc92ebb595a15bd30fe2d483480a806cc6 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Thu, 16 Nov 2023 18:15:56 -0700 Subject: [PATCH] Bug 1824856 - migrate android buildconfig and compare-locales lint jobs to source-tests. r=bhearsum,amejiamarmol,geckoview-reviewers,releng-reviewers Differential Revision: https://phabricator.services.mozilla.com/D201435 --- mobile/android/taskcluster/ci/lint/buildconfig.yml | 53 ------------------ .../ci/source-test/android-compare-locales.yml | 25 ++++++--- taskcluster/ci/source-test/buildconfig.yml | 65 ++++++++++++++++++++++ taskcluster/ci/source-test/kind.yml | 2 + 4 files changed, 83 insertions(+), 62 deletions(-) delete mode 100644 mobile/android/taskcluster/ci/lint/buildconfig.yml rename mobile/android/taskcluster/ci/lint/compare-locales.yml => taskcluster/ci/source-test/android-compare-locales.yml (52%) create mode 100644 taskcluster/ci/source-test/buildconfig.yml diff --git a/mobile/android/taskcluster/ci/lint/buildconfig.yml b/mobile/android/taskcluster/ci/lint/buildconfig.yml deleted file mode 100644 index 85ca901779a1..000000000000 --- a/mobile/android/taskcluster/ci/lint/buildconfig.yml +++ /dev/null @@ -1,53 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. ---- -task-defaults: - description: Make sure the content of .buildconfig.yml matches what gradle knows about its projects - run: - using: run-task - cwd: '{checkout}' - worker: - artifacts: - - name: public/git - path: '/builds/worker/checkouts/vcs/artifacts/git' - type: directory - treeherder: - tier: 2 - - -buildconfig-android-components: - optimization: - skip-unless-changed: - - "android-components/**/build.gradle" - - "android-components/.buildconfig.yml" - run: - command: 'pip install --user --require-hashes --requirement taskcluster/scripts/lint/requirements.txt && taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py android-components' - treeherder: - symbol: buildconfig(AC) - -buildconfig-focus: - optimization: - skip-unless-changed: - - "android-components/**/build.gradle" # A change in A-C may be reflected in focus - - "android-components/.buildconfig.yml" - - "focus-android/**/build.gradle" - - "focus-android/.buildconfig.yml" - run: - command: 'pip install --user --require-hashes --requirement taskcluster/scripts/lint/requirements.txt && taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py focus-android' - treeherder: - symbol: buildconfig(focus) - -buildconfig-fenix: - dependencies: - external-gradle-dependencies: external-gradle-dependencies-lint-fenix - optimization: - skip-unless-changed: - - "android-components/**/build.gradle" # A change in A-C may be reflected in fenix - - "android-components/.buildconfig.yml" - - "fenix/**/build.gradle" - - "fenix/.buildconfig.yml" - run: - command: 'pip install --user --require-hashes --requirement taskcluster/scripts/lint/requirements.txt && taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py fenix' - treeherder: - symbol: buildconfig(fenix) diff --git a/mobile/android/taskcluster/ci/lint/compare-locales.yml b/taskcluster/ci/source-test/android-compare-locales.yml similarity index 52% rename from mobile/android/taskcluster/ci/lint/compare-locales.yml rename to taskcluster/ci/source-test/android-compare-locales.yml index a8ab23de6672..93d31262eeca 100644 --- a/mobile/android/taskcluster/ci/lint/compare-locales.yml +++ b/taskcluster/ci/source-test/android-compare-locales.yml @@ -2,31 +2,38 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. --- -task-defaults: - description: 'Validate strings.xml with compare-locales' +job-defaults: + description: 'Validate android strings.xml with compare-locales' run: using: run-task cwd: '{checkout}' - command: 'pip install --user "compare-locales>=5.0.2,<6.0" && compare-locales --validate l10n.toml .' + command: 'pip install --break-system-packages --user "compare-locales>=5.0.2,<6.0" && /builds/worker/.local/bin/compare-locales --validate l10n.toml .' + worker-type: t-linux-xlarge-source + platform: lint/opt treeherder: + kind: other tier: 2 + worker: + docker-image: {in-tree: lint} + max-run-time: 1800 + use-system-python: true compare-locales-android-components: optimization: skip-unless-changed: - - "android-components/**" + - "mobile/android/android-components/**" run: - cwd: '{checkout}/android-components' + cwd: '{checkout}/mobile/android/android-components' treeherder: symbol: compare-locales(AC) compare-locales-focus: optimization: skip-unless-changed: - - "focus-android/**" + - "mobile/android/focus-android/**" run: - cwd: '{checkout}/focus-android' + cwd: '{checkout}/mobile/android/focus-android' treeherder: symbol: compare-locales(focus) @@ -35,8 +42,8 @@ compare-locales-fenix: external-gradle-dependencies: external-gradle-dependencies-lint-fenix optimization: skip-unless-changed: - - "fenix/**" + - "mobile/android/fenix/**" run: - cwd: '{checkout}/fenix' + cwd: '{checkout}/mobile/android/fenix' treeherder: symbol: compare-locales(fenix) diff --git a/taskcluster/ci/source-test/buildconfig.yml b/taskcluster/ci/source-test/buildconfig.yml new file mode 100644 index 000000000000..38d91568ba3b --- /dev/null +++ b/taskcluster/ci/source-test/buildconfig.yml @@ -0,0 +1,65 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +--- +job-defaults: + description: Make sure the content of .buildconfig.yml matches what gradle knows about its projects + run: + using: run-task + cwd: '{checkout}' + worker-type: t-linux-xlarge-source + worker: + artifacts: + - type: directory + name: public + path: '/builds/worker/artifacts' + docker-image: {in-tree: lint} + max-run-time: 1800 + env: + JAVA_HOME: "/builds/worker/fetches/jdk/jdk-17.0.6+10" + GRADLE_USER_HOME: "/builds/worker/checkouts/gecko/mobile/android/gradle/dotgradle-online" + platform: lint/opt + treeherder: + kind: other + tier: 2 + fetches: + toolchain: + - linux64-jdk-repack + use-system-python: true + + +buildconfig-android-components: + optimization: + skip-unless-changed: + - "mobile/android/android-components/**/build.gradle" + - "mobile/android/android-components/.buildconfig.yml" + run: + command: 'pip install --break-system-packages --user --require-hashes --requirement taskcluster/scripts/lint/requirements.txt && taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py mobile/android/android-components' + treeherder: + symbol: buildconfig(AC) + +buildconfig-focus: + optimization: + skip-unless-changed: + - "mobile/android/android-components/**/build.gradle" # A change in A-C may be reflected in focus + - "mobile/android/android-components/.buildconfig.yml" + - "mobile/android/focus-android/**/build.gradle" + - "mobile/android/focus-android/.buildconfig.yml" + run: + command: 'pip install --break-system-packages --user --require-hashes --requirement taskcluster/scripts/lint/requirements.txt && taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py mobile/android/focus-android' + treeherder: + symbol: buildconfig(focus) + +buildconfig-fenix: + dependencies: + external-gradle-dependencies: external-gradle-dependencies-lint-fenix + optimization: + skip-unless-changed: + - "mobile/android/android-components/**/build.gradle" # A change in A-C may be reflected in fenix + - "mobile/android/android-components/.buildconfig.yml" + - "mobile/android/fenix/**/build.gradle" + - "mobile/android/fenix/.buildconfig.yml" + run: + command: 'pip install --break-system-packages --user --require-hashes --requirement taskcluster/scripts/lint/requirements.txt && taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py mobile/android/fenix' + treeherder: + symbol: buildconfig(fenix) diff --git a/taskcluster/ci/source-test/kind.yml b/taskcluster/ci/source-test/kind.yml index bb605e939a90..12384f2ed283 100644 --- a/taskcluster/ci/source-test/kind.yml +++ b/taskcluster/ci/source-test/kind.yml @@ -18,6 +18,8 @@ kind-dependencies: - build jobs-from: + - android-compare-locales.yml + - buildconfig.yml - clang.yml - cram.yml - doc.yml -- 2.11.4.GIT