forked from mirrors/gecko-dev
Bug 1598226 - Create task definitions for external clang-tidy checks; r=andi,tjr,glandium
Depends on D81448 Differential Revision: https://phabricator.services.mozilla.com/D84769
This commit is contained in:
parent
a157125ab9
commit
103a325162
5 changed files with 89 additions and 2 deletions
17
build/build-clang/civet-tidy-linux64.json
Normal file
17
build/build-clang/civet-tidy-linux64.json
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"stages": "1",
|
||||||
|
"build_libcxx": true,
|
||||||
|
"build_type": "Release",
|
||||||
|
"assertions": false,
|
||||||
|
"build_clang_tidy": true,
|
||||||
|
"python_path": "/usr/bin/python2.7",
|
||||||
|
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||||
|
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||||
|
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||||
|
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||||
|
"patches": [
|
||||||
|
"clang-tidy-ci.patch",
|
||||||
|
"clang-tidy-no-errors.patch"
|
||||||
|
],
|
||||||
|
"build_clang_tidy_external": true
|
||||||
|
}
|
||||||
|
|
@ -424,6 +424,14 @@ clang-10:
|
||||||
repo: https://github.com/llvm/llvm-project
|
repo: https://github.com/llvm/llvm-project
|
||||||
revision: d32170dbd5b0d54436537b6b75beaf44324e0c28
|
revision: d32170dbd5b0d54436537b6b75beaf44324e0c28
|
||||||
|
|
||||||
|
civet-source:
|
||||||
|
description: Repository for external static analysis checks
|
||||||
|
fetch:
|
||||||
|
type: git
|
||||||
|
repo: git@github.com:mozilla-services/civet.git
|
||||||
|
revision: 1a7a27f0a3bede8f94ac1e7c73f400de797296b5
|
||||||
|
ssh-key: project/civet/github-deploy-key
|
||||||
|
|
||||||
wasi-sdk:
|
wasi-sdk:
|
||||||
description: wasi-sdk source code
|
description: wasi-sdk source code
|
||||||
fetch:
|
fetch:
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ job-defaults:
|
||||||
fetches:
|
fetches:
|
||||||
toolchain:
|
toolchain:
|
||||||
- linux64-clang
|
- linux64-clang
|
||||||
- linux64-clang-tidy
|
|
||||||
- linux64-rust
|
- linux64-rust
|
||||||
- linux64-cbindgen
|
- linux64-cbindgen
|
||||||
- linux64-nasm
|
- linux64-nasm
|
||||||
|
|
@ -52,7 +51,9 @@ tidy:
|
||||||
command: >-
|
command: >-
|
||||||
source taskcluster/scripts/misc/source-test-clang-setup.sh &&
|
source taskcluster/scripts/misc/source-test-clang-setup.sh &&
|
||||||
./mach --log-no-times static-analysis check --outgoing --output $HOME/clang-tidy.json --format json
|
./mach --log-no-times static-analysis check --outgoing --output $HOME/clang-tidy.json --format json
|
||||||
|
fetches:
|
||||||
|
toolchain:
|
||||||
|
- linux64-clang-tidy
|
||||||
worker:
|
worker:
|
||||||
artifacts:
|
artifacts:
|
||||||
- type: file
|
- type: file
|
||||||
|
|
@ -69,6 +70,9 @@ format:
|
||||||
source taskcluster/scripts/misc/source-test-clang-setup.sh &&
|
source taskcluster/scripts/misc/source-test-clang-setup.sh &&
|
||||||
./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.json --format json &&
|
./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.json --format json &&
|
||||||
./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.diff --format diff
|
./mach --log-no-times clang-format --outgoing --output $HOME/clang-format.diff --format diff
|
||||||
|
fetches:
|
||||||
|
toolchain:
|
||||||
|
- linux64-clang-tidy
|
||||||
worker:
|
worker:
|
||||||
artifacts:
|
artifacts:
|
||||||
- type: file
|
- type: file
|
||||||
|
|
@ -77,3 +81,23 @@ format:
|
||||||
- type: file
|
- type: file
|
||||||
name: public/code-review/clang-format.diff
|
name: public/code-review/clang-format.diff
|
||||||
path: /builds/worker/clang-format.diff
|
path: /builds/worker/clang-format.diff
|
||||||
|
|
||||||
|
civet:
|
||||||
|
description: Run static-analysis (clang-tidy) on C/C++ patches with external checks
|
||||||
|
attributes:
|
||||||
|
code-review: false
|
||||||
|
treeherder:
|
||||||
|
symbol: cpp(clang-civet)
|
||||||
|
run:
|
||||||
|
cwd: '{checkout}'
|
||||||
|
command: >-
|
||||||
|
source taskcluster/scripts/misc/source-test-clang-setup.sh &&
|
||||||
|
./mach --log-no-times static-analysis check --checks="-*,mozilla-civet-*" --outgoing --output $HOME/clang-tidy.json --format json
|
||||||
|
fetches:
|
||||||
|
toolchain:
|
||||||
|
- linux64-civet-tidy
|
||||||
|
worker:
|
||||||
|
artifacts:
|
||||||
|
- type: file
|
||||||
|
name: public/code-review/clang-tidy.json
|
||||||
|
path: /builds/worker/clang-tidy.json
|
||||||
|
|
|
||||||
|
|
@ -92,3 +92,27 @@ win64-clang-tidy:
|
||||||
fetch:
|
fetch:
|
||||||
- cmake
|
- cmake
|
||||||
- ninja
|
- ninja
|
||||||
|
|
||||||
|
linux64-civet-tidy:
|
||||||
|
index:
|
||||||
|
job-name: linux64-civet-tidy
|
||||||
|
treeherder:
|
||||||
|
symbol: TL(linux64-civet-tidy)
|
||||||
|
worker:
|
||||||
|
artifacts:
|
||||||
|
- name: project/civet/clang-tidy.tar.zst
|
||||||
|
path: /builds/worker/private-artifacts/clang-tidy.tar.zst
|
||||||
|
type: file
|
||||||
|
run:
|
||||||
|
toolchain-artifact: project/civet/clang-tidy.tar.zst
|
||||||
|
script: build-civet.sh
|
||||||
|
arguments:
|
||||||
|
- 'build/build-clang/civet-tidy-linux64.json'
|
||||||
|
resources:
|
||||||
|
- 'build/build-clang/civet-tidy-linux64.json'
|
||||||
|
fetches:
|
||||||
|
fetch:
|
||||||
|
- civet-source
|
||||||
|
toolchain:
|
||||||
|
- linux64-binutils
|
||||||
|
- linux64-gcc-7
|
||||||
|
|
|
||||||
14
taskcluster/scripts/misc/build-civet.sh
Executable file
14
taskcluster/scripts/misc/build-civet.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# Because we specify a private artifact, UPLOAD_DIR is not populated for us
|
||||||
|
export UPLOAD_DIR="/builds/worker/private-artifacts/"
|
||||||
|
|
||||||
|
# # Delete the external directory
|
||||||
|
rm -rf $GECKO_PATH/build/clang-plugin/external/*
|
||||||
|
|
||||||
|
# # Move civet into its place
|
||||||
|
cp -r $MOZ_FETCHES_DIR/civet.git/* $GECKO_PATH/build/clang-plugin/external
|
||||||
|
|
||||||
|
# Call build-clang.sh with this script's first argument (our JSON config)
|
||||||
|
$GECKO_PATH/taskcluster/scripts/misc/build-clang.sh $1
|
||||||
Loading…
Reference in a new issue