summaryrefslogtreecommitdiffstats
path: root/taskcluster/ci/source-test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--taskcluster/ci/source-test/android-compare-locales.yml47
-rw-r--r--taskcluster/ci/source-test/android-detekt.yml76
-rw-r--r--taskcluster/ci/source-test/android-lint.yml66
-rw-r--r--taskcluster/ci/source-test/buildconfig.yml68
-rw-r--r--taskcluster/ci/source-test/kind.yml8
-rw-r--r--taskcluster/ci/source-test/ktlint.yml59
-rw-r--r--taskcluster/ci/source-test/mozlint-android.yml1
-rw-r--r--taskcluster/ci/source-test/node.yml35
-rw-r--r--taskcluster/ci/source-test/python.yml2
-rw-r--r--taskcluster/ci/source-test/taskgraph.yml9
10 files changed, 368 insertions, 3 deletions
diff --git a/taskcluster/ci/source-test/android-compare-locales.yml b/taskcluster/ci/source-test/android-compare-locales.yml
new file mode 100644
index 0000000000..6423ad708d
--- /dev/null
+++ b/taskcluster/ci/source-test/android-compare-locales.yml
@@ -0,0 +1,47 @@
+# 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: 'Validate android strings.xml with compare-locales'
+ run:
+ using: run-task
+ cwd: '{checkout}'
+ 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-python: system
+
+
+compare-locales-android-components:
+ optimization:
+ skip-unless-changed:
+ - "mobile/android/android-components/**"
+ run:
+ cwd: '{checkout}/mobile/android/android-components'
+ treeherder:
+ symbol: compare-locales(AC)
+
+compare-locales-focus:
+ optimization:
+ skip-unless-changed:
+ - "mobile/android/focus-android/**"
+ run:
+ cwd: '{checkout}/mobile/android/focus-android'
+ treeherder:
+ symbol: compare-locales(focus)
+
+compare-locales-fenix:
+ optimization:
+ skip-unless-changed:
+ - "mobile/android/fenix/**"
+ run:
+ cwd: '{checkout}/mobile/android/fenix'
+ treeherder:
+ symbol: compare-locales(fenix)
diff --git a/taskcluster/ci/source-test/android-detekt.yml b/taskcluster/ci/source-test/android-detekt.yml
new file mode 100644
index 0000000000..84f46ed6b7
--- /dev/null
+++ b/taskcluster/ci/source-test/android-detekt.yml
@@ -0,0 +1,76 @@
+# 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: 'Run detekt over all modules'
+ run:
+ using: gradlew
+ gradlew: ['detekt']
+ use-caches: false
+ worker:
+ docker-image: {in-tree: lint}
+ max-run-time: 1200
+ env:
+ JAVA_HOME: "/builds/worker/fetches/jdk/jdk-17.0.6+10"
+ attributes:
+ code-review: true
+ always-target: true
+ fetches:
+ toolchain:
+ - android-sdk-linux
+ - android-gradle-dependencies
+ - android-gradle-python-envs
+ - linux64-jdk-repack
+ platform: 'lint/opt'
+ treeherder:
+ kind: test
+ tier: 1
+ worker-type: b-linux-gcp
+ when:
+ files-changed:
+ - "mobile/android/android-components/**"
+
+
+detekt-android-components:
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/android-components"]
+ treeherder:
+ symbol: detekt(AC)
+ worker:
+ artifacts:
+ - name: public/reports
+ path: /builds/worker/checkouts/gecko/mobile/android/android-components/build/reports
+ type: directory
+
+detekt-focus:
+ when:
+ files-changed:
+ - "mobile/android/focus-android/**"
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/focus-android"]
+ treeherder:
+ symbol: detekt(focus)
+ worker:
+ artifacts:
+ - name: public/reports
+ path: /builds/worker/checkouts/gecko/mobile/android/focus-android/build/reports
+ type: directory
+
+detekt-fenix:
+ when:
+ files-changed:
+ - "mobile/android/fenix/**"
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/fenix"]
+ gradlew: [detekt, 'mozilla-detekt-rules:test']
+ treeherder:
+ symbol: detekt(fenix)
+ worker:
+ artifacts:
+ - name: public/reports
+ path: /builds/worker/checkouts/gecko/mobile/android/fenix/build/reports
+ type: directory
diff --git a/taskcluster/ci/source-test/android-lint.yml b/taskcluster/ci/source-test/android-lint.yml
new file mode 100644
index 0000000000..c7eb456021
--- /dev/null
+++ b/taskcluster/ci/source-test/android-lint.yml
@@ -0,0 +1,66 @@
+# 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: 'Run lint over all modules'
+ run:
+ using: gradlew
+ gradlew: ['lint']
+ use-caches: false
+ worker:
+ max-run-time: 2700
+ env:
+ JAVA_HOME: "/builds/worker/fetches/jdk/jdk-17.0.6+10"
+ docker-image: {in-tree: lint}
+ always-target: false
+ attributes:
+ code-review: true
+ dependencies:
+ build-fat-aar: build-fat-aar-android-geckoview-fat-aar/opt
+ fetches:
+ toolchain:
+ - android-sdk-linux
+ - android-gradle-dependencies
+ - android-gradle-python-envs
+ - linux64-jdk-repack
+ build-fat-aar:
+ - target.maven.tar.xz
+ platform: 'lint/opt'
+ treeherder:
+ kind: test
+ tier: 1
+ worker-type: b-linux-gcp
+ when:
+ files-changed:
+ - "mobile/android/android-components/**"
+
+
+android-components:
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/android-components"]
+ gradlew: ["--no-parallel"]
+ treeherder:
+ symbol: lint(AC)
+
+focus:
+ when:
+ files-changed:
+ - "mobile/android/focus-android/**"
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/focus-android"]
+ treeherder:
+ symbol: lint(focus)
+
+fenix:
+ when:
+ files-changed:
+ - "mobile/android/fenix/**"
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/fenix"]
+ gradlew: ['lintDebug', 'mozilla-lint-rules:test']
+ treeherder:
+ symbol: lint(fenix)
diff --git a/taskcluster/ci/source-test/buildconfig.yml b/taskcluster/ci/source-test/buildconfig.yml
new file mode 100644
index 0000000000..85f0828a54
--- /dev/null
+++ b/taskcluster/ci/source-test/buildconfig.yml
@@ -0,0 +1,68 @@
+# 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"
+ MOZCONFIG: "/builds/worker/checkouts/gecko/mobile/android/config/mozconfigs/android-arm/nightly-android-lints"
+ ANDROID_SDK_ROOT: "/builds/worker/fetches/android-sdk-linux"
+ platform: lint/opt
+ treeherder:
+ kind: other
+ tier: 2
+ fetches:
+ toolchain:
+ - linux64-jdk-repack
+ - android-gradle-dependencies
+ - android-gradle-python-envs
+ - android-sdk-linux
+ use-python: system
+
+
+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 && ./mach --log-no-times build pre-export export && 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 && ./mach --log-no-times build pre-export export && taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py mobile/android/focus-android'
+ treeherder:
+ symbol: buildconfig(focus)
+
+buildconfig-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 && ./mach --log-no-times build pre-export export && 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 bb605e939a..f28ee39f96 100644
--- a/taskcluster/ci/source-test/kind.yml
+++ b/taskcluster/ci/source-test/kind.yml
@@ -16,13 +16,19 @@ kind-dependencies:
- fetch
- toolchain
- build
+ - build-fat-aar
jobs-from:
+ - android-compare-locales.yml
+ - android-detekt.yml
+ - android-lint.yml
+ - buildconfig.yml
- clang.yml
- cram.yml
- doc.yml
- file-metadata.yml
- jsshell.yml
+ - ktlint.yml
- mozlint.yml
- mozlint-android.yml
- node.yml
@@ -37,7 +43,7 @@ jobs-from:
- wpt-metadata.yml
job-defaults:
- use-system-python: false
+ use-python: default
attributes:
retrigger: true
task-context:
diff --git a/taskcluster/ci/source-test/ktlint.yml b/taskcluster/ci/source-test/ktlint.yml
new file mode 100644
index 0000000000..988f2b6660
--- /dev/null
+++ b/taskcluster/ci/source-test/ktlint.yml
@@ -0,0 +1,59 @@
+# 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: 'Run ktlint over all modules'
+ run:
+ using: gradlew
+ gradlew: ['ktlint']
+ use-caches: false
+ attributes:
+ code-review: true
+ always-target: true
+ fetches:
+ toolchain:
+ - android-sdk-linux
+ - android-gradle-dependencies
+ - android-gradle-python-envs
+ - linux64-jdk-repack
+ platform: 'lint/opt'
+ treeherder:
+ kind: test
+ tier: 1
+ worker-type: b-linux-gcp
+ worker:
+ docker-image: {in-tree: lint}
+ max-run-time: 1200
+ env:
+ JAVA_HOME: "/builds/worker/fetches/jdk/jdk-17.0.6+10"
+ when:
+ files-changed:
+ - "mobile/android/android-components/**"
+
+android-components:
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/android-components"]
+ treeherder:
+ symbol: ktlint(AC)
+
+focus:
+ when:
+ files-changed:
+ - "mobile/android/focus-android/**"
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/focus-android"]
+ treeherder:
+ symbol: ktlint(focus)
+
+fenix:
+ when:
+ files-changed:
+ - "mobile/android/fenix/**"
+ run:
+ pre-gradlew:
+ - ["cd", "mobile/android/fenix"]
+ treeherder:
+ symbol: ktlint(fenix)
diff --git a/taskcluster/ci/source-test/mozlint-android.yml b/taskcluster/ci/source-test/mozlint-android.yml
index 6602d8c818..d98abe9734 100644
--- a/taskcluster/ci/source-test/mozlint-android.yml
+++ b/taskcluster/ci/source-test/mozlint-android.yml
@@ -81,6 +81,7 @@ lints:
toolchain:
# Aliases aren't allowed for toolchains installed by fetch.
- linux64-android-gradle-dependencies
+ - android-gradle-python-envs
- linux64-android-sdk-linux-repack
- linux64-jdk-repack
- linux64-node
diff --git a/taskcluster/ci/source-test/node.yml b/taskcluster/ci/source-test/node.yml
index f1df46b73d..1d8c8348fb 100644
--- a/taskcluster/ci/source-test/node.yml
+++ b/taskcluster/ci/source-test/node.yml
@@ -184,3 +184,38 @@ eslint-plugin-mozilla:
when:
files-changed:
- 'tools/lint/eslint/eslint-plugin-mozilla/**'
+
+design-tokens-tests:
+ description: design tokens unit tests
+ platform: linux1804-64/opt
+ treeherder:
+ symbol: node(design-tokens)
+ kind: test
+ tier: 1
+ worker-type: t-linux-xlarge-source
+ worker:
+ docker-image: {in-tree: "ubuntu1804-test"}
+ max-run-time: 1800
+ require-build:
+ by-project:
+ autoland:
+ linux1804-64/opt: build-linux64/opt
+ try:
+ linux1804-64/opt: build-linux64/opt
+ default:
+ linux1804-64/opt: build-linux64-shippable/opt
+ run:
+ using: run-task
+ cache-dotcache: true
+ cwd: '{checkout}'
+ command: >
+ cd /builds/worker/checkouts/gecko &&
+ rm -rf node_modules &&
+ npm ci &&
+ cd /builds/worker/checkouts/gecko/toolkit/themes/shared/design-system &&
+ rm -rf node_modules &&
+ npm ci &&
+ node tests/try-runner.js
+ when:
+ files-changed:
+ - "toolkit/themes/shared/design-system/**"
diff --git a/taskcluster/ci/source-test/python.yml b/taskcluster/ci/source-test/python.yml
index d9e0ede88b..43680aacad 100644
--- a/taskcluster/ci/source-test/python.yml
+++ b/taskcluster/ci/source-test/python.yml
@@ -24,7 +24,7 @@ job-defaults:
PATH: "/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"
default:
max-run-time: 3600
- use-system-python: false
+ use-python: default
treeherder:
kind: test
tier: 1
diff --git a/taskcluster/ci/source-test/taskgraph.yml b/taskcluster/ci/source-test/taskgraph.yml
index ab6883919a..3065c80482 100644
--- a/taskcluster/ci/source-test/taskgraph.yml
+++ b/taskcluster/ci/source-test/taskgraph.yml
@@ -24,11 +24,18 @@ diff:
platform: gecko-decision/opt
symbol: tgdiff
tier: 2
+ task-context:
+ from-parameters:
+ base_rev: base_rev
+ substitution-fields:
+ - run.command
run:
using: run-task
cwd: '{checkout}'
command: >-
- echo 'disabled'
+ mkdir -p /builds/worker/artifacts/diffs &&
+ ./mach taskgraph target --fast -p "taskcluster/test/params" --force-local-files-changed -o "/builds/worker/artifacts/diffs/diff.txt" --diff {base_rev} &&
+ python taskcluster/scripts/misc/summarize-tgdiff.py /builds/worker/artifacts/diffs/ 20
when:
files-changed:
- 'taskcluster/ci/**'