clang.yml (3745B)
1 # This Source Code Form is subject to the terms of the Mozilla Public 2 # License, v. 2.0. If a copy of the MPL was not distributed with this 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 --- 5 task-defaults: 6 run-on-repo-type: [hg] 7 run-on-projects: ["trunk"] 8 platform: linux64/debug 9 worker-type: t-linux-docker-amd 10 attributes: 11 code-review: true 12 worker: 13 docker-image: {in-tree: static-analysis-build} 14 max-run-time: 5400 15 treeherder: 16 kind: other 17 tier: 2 18 run: 19 using: run-task 20 tooltool-downloads: public 21 fetches: 22 toolchain: 23 - linux64-cbindgen 24 - linux64-nasm 25 - linux64-node 26 when: 27 files-changed: 28 - '**/*.c' 29 - '**/*.cpp' 30 - '**/*.cc' 31 - '**/*.cxx' 32 - '**/*.m' 33 - '**/*.mm' 34 35 tidy: 36 description: Run static-analysis (clang-tidy) on C/C++ patches 37 treeherder: 38 symbol: cpp(clang-tidy) 39 run: 40 cwd: '{checkout}' 41 command: >- 42 source taskcluster/scripts/misc/source-test-clang-setup.sh && 43 ./mach --log-no-times static-analysis check --outgoing --output $HOME/clang-tidy.json --format json 44 fetches: 45 toolchain: 46 - linux64-clang 47 - linux64-clang-tidy 48 - linux64-rust 49 - sysroot-x86_64-linux-gnu 50 - sysroot-wasm32-wasi 51 worker: 52 artifacts: 53 - type: file 54 name: public/code-review/clang-tidy.json 55 path: /builds/worker/clang-tidy.json 56 57 format: 58 description: Run clang-format on C/C++ patches 59 treeherder: 60 symbol: cpp(clang-format) 61 # Run only on try and code-review tasks 62 # to avoid running clang format on the whole codebase 63 run-on-projects: [] 64 run: 65 cwd: '{checkout}' 66 command: >- 67 source taskcluster/scripts/misc/source-test-clang-setup.sh && 68 ./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.json --format json && 69 ./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.diff --format diff 70 fetches: 71 toolchain: 72 - linux64-clang 73 - linux64-clang-tidy 74 - linux64-rust 75 - sysroot-x86_64-linux-gnu 76 - sysroot-wasm32-wasi 77 when: 78 files-changed: 79 - '**/*.c' 80 - '**/*.cpp' 81 - '**/*.cc' 82 - '**/*.cxx' 83 - '**/*.m' 84 - '**/*.mm' 85 - '**/*.h' 86 - '**/*.hh' 87 - '**/*.hpp' 88 - '**/*.hxx' 89 worker: 90 artifacts: 91 - type: file 92 name: public/code-review/clang-format.json 93 path: /builds/worker/clang-format.json 94 - type: file 95 name: public/code-review/clang-format.diff 96 path: /builds/worker/clang-format.diff 97 98 external: 99 description: Run static-analysis (clang-tidy) on C/C++ patches with external checks 100 treeherder: 101 symbol: cpp(clang-tidy-external) 102 run: 103 cwd: '{checkout}' 104 command: >- 105 source taskcluster/scripts/misc/source-test-clang-setup.sh && 106 ./mach --log-no-times static-analysis check --checks="-*,mozilla-civet-*" --outgoing --output $HOME/clang-tidy.json --format json 107 fetches: 108 toolchain: 109 - linux64-clang 110 - linux64-clang-tidy-external 111 - linux64-rust 112 - sysroot-x86_64-linux-gnu 113 - sysroot-wasm32-wasi 114 worker: 115 artifacts: 116 - type: file 117 name: public/code-review/clang-tidy.json 118 path: /builds/worker/clang-tidy.json