forked from scikit-learn/scikit-learn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
186 lines (179 loc) · 5.91 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Adapted from https://github.com/pandas-dev/pandas/blob/master/azure-pipelines.yml
schedules:
- cron: "30 2 * * *"
displayName: Run nightly build
branches:
include:
- master
always: true
jobs:
- job: linting
displayName: Linting
pool:
vmImage: ubuntu-18.04
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
- bash: |
pip install flake8 mypy==0.780
displayName: Install linters
- bash: |
set -ex
if [[ $BUILD_REASON == "PullRequest" ]]; then
# By default pull requests use refs/pull/PULL_ID/merge as the source branch
# which has a "Merge ID into ID" as a commit message. The latest commit
# message is the second to last commit
COMMIT_ID=$(echo $BUILD_SOURCEVERSIONMESSAGE | awk '{print $2}')
COMMIT_MESSAGE=$(git log $COMMIT_ID -1 --pretty=%B)
else
COMMIT_MESSAGE=$BUILD_SOURCEVERSIONMESSAGE
fi
echo "##vso[task.setvariable variable=COMMIT_MESSAGE]$COMMIT_MESSAGE"
displayName: Get source version message
- bash: |
set -ex
if [[ "$COMMIT_MESSAGE" =~ "[lint skip]" ]]; then
# skip linting
echo "Skipping flake8 linting"
exit 0
else
./build_tools/circle/linting.sh
fi
displayName: Run linting
- bash: |
set -ex
if [[ "$COMMIT_MESSAGE" =~ "[lint skip]" ]]; then
# skip linting
echo "Skipping mypy linting"
exit 0
else
mypy sklearn/ --ignore-missing-imports
fi
displayName: Run mypy
- bash: |
if [[ "$COMMIT_MESSAGE" =~ "[scipy-dev]" ]] || [[ $BUILD_REASON == "Schedule" ]]; then
echo "Running scipy-dev"
echo "##vso[task.setvariable variable=runScipyDev;isOutput=true]true"
else
echo "##vso[task.setvariable variable=runScipyDev;isOutput=true]false"
fi
name: gitCommitMessage
displayName: Determine to run scipy-dev
- template: build_tools/azure/posix.yml
parameters:
name: Linux_Nightly
vmImage: ubuntu-18.04
dependsOn: [linting]
condition: eq(dependencies['linting']['outputs']['gitCommitMessage.runScipyDev'], 'true')
matrix:
pylatest_pip_scipy_dev:
DISTRIB: 'conda-pip-scipy-dev'
PYTHON_VERSION: '*'
CHECK_WARNINGS: 'true'
CHECK_PYTEST_SOFT_DEPENDENCY: 'true'
TEST_DOCSTRINGS: 'true'
# Tests that require large downloads over the networks are skipped in CI.
# Here we make sure, that they are still run on a regular basis.
SKLEARN_SKIP_NETWORK_TESTS: '0'
# Will run all the time regardless of linting outcome.
- template: build_tools/azure/posix.yml
parameters:
name: Linux_Runs
vmImage: ubuntu-18.04
matrix:
pylatest_conda_mkl:
DISTRIB: 'conda'
PYTHON_VERSION: '*'
BLAS: 'mkl'
COVERAGE: 'true'
- template: build_tools/azure/posix.yml
parameters:
name: Linux
vmImage: ubuntu-18.04
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
matrix:
# Linux environment to test that scikit-learn can be built against
# versions of numpy, scipy with ATLAS that comes with Ubuntu Bionic 18.04
# i.e. numpy 1.13.3 and scipy 0.19
py36_ubuntu_atlas:
DISTRIB: 'ubuntu'
PYTHON_VERSION: '3.6'
JOBLIB_VERSION: 'min'
PANDAS_VERSION: 'none'
THREADPOOLCTL_VERSION: 'min'
PYTEST_VERSION: 'min'
PYTEST_XDIST_VERSION: 'none'
COVERAGE: 'false'
# Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB
py36_conda_openblas:
DISTRIB: 'conda'
PYTHON_VERSION: '3.6'
BLAS: 'openblas'
NUMPY_VERSION: 'min'
SCIPY_VERSION: 'min'
MATPLOTLIB_VERSION: 'min'
# latest version of joblib available in conda for Python 3.6
JOBLIB_VERSION: '0.13.2'
THREADPOOLCTL_VERSION: '2.0.0'
# temporary pin pytest due to unknown failure with pytest 5.4 and
# python 3.6
PYTEST_VERSION: 'min'
PYTEST_XDIST_VERSION: 'none'
# Linux environment to test the latest available dependencies and MKL.
# It runs tests requiring lightgbm, pandas and PyAMG.
pylatest_pip_openblas_pandas:
DISTRIB: 'conda-pip-latest'
PYTHON_VERSION: '3.8'
PANDAS_VERSION: 'none'
CHECK_PYTEST_SOFT_DEPENDENCY: 'true'
TEST_DOCSTRINGS: 'true'
CHECK_WARNINGS: 'true'
- template: build_tools/azure/posix-32.yml
parameters:
name: Linux32
vmImage: ubuntu-18.04
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
matrix:
py36_ubuntu_atlas_32bit:
DISTRIB: 'ubuntu-32'
PYTHON_VERSION: '3.6'
PANDAS_VERSION: 'none'
JOBLIB_VERSION: 'min'
# temporary pin pytest due to unknown failure with pytest 5.4 and
# python 3.6
PYTEST_VERSION: 'min'
THREADPOOLCTL_VERSION: 'min'
- template: build_tools/azure/posix.yml
parameters:
name: macOS
vmImage: macOS-10.14
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
matrix:
pylatest_conda_mkl:
DISTRIB: 'conda'
BLAS: 'mkl'
pylatest_conda_mkl_no_openmp:
DISTRIB: 'conda'
BLAS: 'mkl'
SKLEARN_TEST_NO_OPENMP: 'true'
SKLEARN_SKIP_OPENMP_TEST: 'true'
- template: build_tools/azure/windows.yml
parameters:
name: Windows
vmImage: vs2017-win2016
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
matrix:
py37_conda_mkl:
PYTHON_VERSION: '3.7'
CHECK_WARNINGS: 'true'
PYTHON_ARCH: '64'
PYTEST_VERSION: '*'
COVERAGE: 'true'
py36_pip_openblas_32bit:
PYTHON_VERSION: '3.6'
PYTHON_ARCH: '32'