forked from XiaobingSuper/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
96 lines (88 loc) · 2.61 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
trigger:
- master
jobs:
- job: consistent_circleci
displayName: "Ensure consistent CircleCI YAML"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.7"
- script: pip install -r requirements.txt
- script: cd .circleci && ./ensure-consistency.py
- job: shellcheck_jenkins
displayName: "Shellcheck Jenkins scripts"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- script: sudo apt-get install -y shellcheck
- script: .jenkins/run-shellcheck.sh
- job: ensure_no_tabs
displayName: "Ensure no tabs"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "2.7"
- script: (! git grep -I -l $'\t' -- . ':(exclude)*.svg' ':(exclude)**Makefile' ':(exclude)**/contrib/**' ':(exclude)third_party' ':(exclude).gitattributes' ':(exclude).gitmodules' || (echo "The above files have tabs; please convert them to spaces"; false))
- job: python_27_lint
displayName: "Python 2.7 Lint"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "2.7"
- script: pip install flake8
- script: |
rm -rf .circleci
flake8 1>&2
- job: python_37_lint
displayName: "Python 3.7 Lint"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.7"
- script: pip install flake8 flake8-bugbear flake8-mypy flake8-comprehensions flake8-pyi mccabe pycodestyle pyflakes
- script: flake8 1>&2
- job: mypy_typecheck
displayName: "MyPy typecheck"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.6"
- script: pip install mypy mypy-extensions
- script: mypy @mypy-files.txt
- job: cpp_doc_check
displayName: "CPP doc check"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.6"
- script: sudo apt-get install -y doxygen && pip install -r requirements.txt
- script: cd docs/cpp/source && ./check-doxygen.sh
- job: clang_tidy
displayName: "clang tidy"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.6"
- script: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main"
sudo apt-get update
sudo apt-get install -y clang-tidy-8
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-8 1000
- script: git branch master origin/master
- script: pip install pyyaml
- script: tools/run-clang-tidy-in-ci.sh