diff options
Diffstat (limited to 'comm/taskcluster/ci/source-test')
-rw-r--r-- | comm/taskcluster/ci/source-test/clang.yml | 58 | ||||
-rw-r--r-- | comm/taskcluster/ci/source-test/kind.yml | 25 | ||||
-rw-r--r-- | comm/taskcluster/ci/source-test/mozlint.yml | 287 | ||||
-rw-r--r-- | comm/taskcluster/ci/source-test/python.yml | 35 |
4 files changed, 405 insertions, 0 deletions
diff --git a/comm/taskcluster/ci/source-test/clang.yml b/comm/taskcluster/ci/source-test/clang.yml new file mode 100644 index 0000000000..899b3aadc7 --- /dev/null +++ b/comm/taskcluster/ci/source-test/clang.yml @@ -0,0 +1,58 @@ +# 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: + always-target: true + platform: linux64/debug + worker-type: t-linux-xlarge-source + attributes: + code-review: true + worker: + docker-image: {in-tree: static-analysis-build} + max-run-time: 5400 + treeherder: + kind: other + tier: 2 + run: + using: run-task + tooltool-downloads: public + comm-checkout: true + fetches: + toolchain: + - linux64-cbindgen + - linux64-nasm + - linux64-node + optimization: + skip-unless-changed-no-suite: + - 'comm/**/*.c' + - 'comm/**/*.cc' + - 'comm/**/*.cpp' + - 'comm/**/*.m' + - 'comm/**/*.mm' + - 'comm/**/*.h' + +format: + description: Run clang-format on C/C++ patches + treeherder: + symbol: cpp(clang-format) + run: + cwd: '{checkout}' + command: >- + ./comm/taskcluster/scripts/source-test-clang-format.sh {changed_files} + + fetches: + toolchain: + - linux64-clang + - linux64-clang-tidy + - linux64-rust + - sysroot-x86_64-linux-gnu + - sysroot-wasm32-wasi + worker: + artifacts: + - type: file + name: public/code-review/clang-format.json + path: /builds/worker/clang-format.json + - type: file + name: public/code-review/clang-format.diff + path: /builds/worker/clang-format.diff diff --git a/comm/taskcluster/ci/source-test/kind.yml b/comm/taskcluster/ci/source-test/kind.yml new file mode 100644 index 0000000000..cf6079c02b --- /dev/null +++ b/comm/taskcluster/ci/source-test/kind.yml @@ -0,0 +1,25 @@ +# 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/. +--- +loader: gecko_taskgraph.loader.transform:loader + +transforms: + - gecko_taskgraph.transforms.try_job:transforms + - gecko_taskgraph.transforms.source_test:transforms + - comm_taskgraph.transforms.source_test:transforms + - gecko_taskgraph.transforms.job:transforms + - gecko_taskgraph.transforms.task:transforms + +kind-dependencies: + - fetch + - toolchain + +jobs-from: + - clang.yml + - mozlint.yml + - python.yml + +job-defaults: + attributes: + retrigger: true diff --git a/comm/taskcluster/ci/source-test/mozlint.yml b/comm/taskcluster/ci/source-test/mozlint.yml new file mode 100644 index 0000000000..2ef12d70c6 --- /dev/null +++ b/comm/taskcluster/ci/source-test/mozlint.yml @@ -0,0 +1,287 @@ +# 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: + always-target: true + attributes: + code-review: true + treeherder: + kind: test + tier: 1 + platform: lint/opt + worker-type: t-linux-xlarge-source + worker: + docker-image: {in-tree: "lint"} + max-run-time: 1800 + artifacts: + - type: file + name: public/code-review/mozlint.json + path: /builds/worker/mozlint.json + env: + MOZLINT_NO_SUITE: '1' + run: + using: mach + comm-checkout: true + +codespell: + description: Checks for misspellings in text files + treeherder: + symbol: text(spell) + # We don't want patches to be backed out because of a typo, a follow-up + # bug will be good enough + tier: 2 + run: + mach: > + lint -v -l codespell -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: codespell.yml + +eslint: + description: JS lint check + treeherder: + symbol: js(ES) + run: + using: run-task + cwd: '{checkout}' + command: > + cp -r /build/node_modules_eslint node_modules && + cp -r /build/node_modules_eslint-plugin-mozilla/ tools/lint/eslint/eslint-plugin-mozilla/node_modules && + ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules && + ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules && + ./mach commlint -v -l eslint -f treeherder -f json:/builds/worker/mozlint.json comm/ + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: eslint.yml + +file-perm: + description: Check for incorrect permissions on source files + platform: lint/opt + treeherder: + symbol: pedantic(file-perm) + # We don't want patches to be backed out because of this, a follow-up + # bug will be good enough + tier: 2 + run: + mach: > + lint -v -l file-perm -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: file-perm.yml + +file-whitespace: + description: Check for trailing whitespaces and Windows CR + platform: lint/opt + treeherder: + symbol: pedantic(file-whitespace) + # We don't want patches to be backed out because of this, a follow-up + # bug will be good enough + tier: 2 + run: + mach: > + lint -v -l file-whitespace -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: file-whitespace.yml + +fluent-lint: + description: Check for problems with Fluent files. + treeherder: + symbol: l10n(fluent) + run: + mach: > + lint -l fluent-lint -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: fluent-lint.yml + +license: + description: Check for license blocks in source files. + treeherder: + symbol: pedantic(license) + run: + mach: > + lint -v -l license -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: license.yml + +l10n-conflicts: + description: l10n tests for strings with errors and conflicts with cross-channel + treeherder: + symbol: l10n(l1nt-conflicts) + always-target: false + run-on-projects: [] + run: + mach: > + lint -W -l l10n -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: l10n.yml + +localization: + description: l10n tests for strings with errors + treeherder: + symbol: l10n(l1nt) + run: + mach: > + lint -v -l l10n -f treeherder + --config-path=comm/tools/lint + comm/* + attributes: + code-review: false + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: l10n.yml + +lintpref: + description: Check for duplicates between all.js and StaticPrefList.yaml. + treeherder: + symbol: misc(pref) + run: + mach: > + lint -v -l lintpref -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: lintpref.yml + +mingw-cap: + description: lint for MinGW Capitalization issues + treeherder: + symbol: misc(mingw) + run: + mach: > + lint -v -l mingw-capitalization -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: mingw-capitalization.yml + +py-black: + description: black run over the gecko codebase + treeherder: + symbol: py(black) + run: + mach: > + lint -v -l black -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: black.yml + +py-ruff: + description: Run ruff over the codebase + treeherder: + symbol: py(ruff) + run: + mach: > + commlint -v -l ruff -f treeherder + -f json:/builds/worker/mozlint.json + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: ruff.yml + +shellcheck: + description: shellcheck run over the Thunderbird codebase + treeherder: + symbol: misc(shell) + run-on-projects: [] + run: + mach: > + lint -v -l shellcheck -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: shellcheck.yml + +stylelint: + description: CSS lint check + treeherder: + symbol: stylelint + run: + using: run-task + cwd: '{checkout}' + command: > + cp -r /build/node_modules_eslint node_modules && + ./mach commlint -v -l stylelint -f treeherder + -f json:/builds/worker/mozlint.json + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: stylelint.yml + +trojan-source: + description: Trojan Source attack - CVE-2021-42572 + platform: lint/opt + treeherder: + symbol: misc(trojan-source) + run: + mach: > + lint -v -l trojan-source -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/* + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: trojan-source.yml + +yaml: + description: yamllint run over the taskcluster configuration + treeherder: + symbol: pedantic(yaml) + run: + mach: > + lint -v -l yaml -f treeherder + -f json:/builds/worker/mozlint.json + --config-path=comm/tools/lint + comm/mail/config + comm/taskcluster + comm/.*.yml + optimization: + skip-unless-mozlint: + root-path: comm + mozlint-config: yaml.yml diff --git a/comm/taskcluster/ci/source-test/python.yml b/comm/taskcluster/ci/source-test/python.yml new file mode 100644 index 0000000000..b3ffc9bc32 --- /dev/null +++ b/comm/taskcluster/ci/source-test/python.yml @@ -0,0 +1,35 @@ +# 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: + platform: linux1804-64/opt + always-target: true + worker-type: t-linux-xlarge-source + worker: + # A build image instead of the lint image m-c uses, because of the + # comm-checkout requirement. + docker-image: {in-tree: "debian11-amd64-build"} + max-run-time: 3600 + env: + MOZCONFIG: comm/mail/config/mozconfigs/linux64/source + treeherder: + kind: test + tier: 1 + run: + comm-checkout: true + +comm_taskgraph-tests: + description: taskcluster/taskgraph unit tests + treeherder: + symbol: py(ctg) + run: + using: run-task + cwd: "{checkout}" + command: > + ./mach configure && + ./mach python-test --subsuite comm_taskgraph + optimization: + skip-unless-changed-no-suite: + - "taskcluster/**/*.py" + - "comm/taskcluster/**/*.py" |