forked from scikit-learn-contrib/scikit-learn-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
170 lines (149 loc) · 4.56 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
jobs:
- job: 'linux'
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
NUMPY_VERSION: "1.16.5"
SCIPY_VERSION: "1.1.0"
SKLEARN_VERSION: "0.24.1"
Python38:
python.version: '3.8'
NUMPY_VERSION: "1.19.4"
SCIPY_VERSION: "1.4.1"
SKLEARN_VERSION: "0.24.1"
Python39:
python.version: '3.9'
NUMPY_VERSION: "1.19.4"
SCIPY_VERSION: "1.5.4"
SKLEARN_VERSION: "nightly"
Py39_sklearn1:
python.version: '3.9'
NUMPY_VERSION: "1.19.4"
SCIPY_VERSION: "1.5.4"
SKLEARN_VERSION: "1.0.0"
variables:
OMP_NUM_THREADS: '2'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
set -xe
python --version
python -m pip install --upgrade pip
if [[ "$SKLEARN_VERSION" == "nightly" ]]; then
# This also installs latest numpy, scipy and joblib.
pip install --pre scikit-learn
else
python -m pip install numpy==$NUMPY_VERSION scipy==$SCIPY_VERSION scikit-learn==$SKLEARN_VERSION
fi
displayName: 'Install dependencies'
- script: |
set -xe
pip install -e .
displayName: 'Install scikit-learn-extra'
- script: |
set -xe
python -m pip install pytest pytest-azurepipelines pytest-cov codecov
# run doctests in the documentation
# TODO: remove "|| .." once at least one doctest is added
python -m pytest doc/*rst doc/modules/*rst || echo "Ignoring exit status"
python -m pytest --durations 10 --cov=sklearn_extra sklearn_extra
displayName: 'Test'
- script: codecov -t $CODECOV_TOKEN || echo "codecov upload failed"
displayName: 'Upload coverage report'
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
- job: 'macOS'
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
NUMPY_VERSION: "1.16.5"
SCIPY_VERSION: "1.1.0"
SKLEARN_VERSION: "0.24.1"
Python38:
python.version: '3.8'
SKLEARN_VERSION: "*"
Py39_sklearn1:
python.version: '3.9'
NUMPY_VERSION: "1.19.4"
SCIPY_VERSION: "1.5.4"
SKLEARN_VERSION: "1.0.0"
variables:
OMP_NUM_THREADS: '2'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
set -xe
python --version
python -m pip install --upgrade pip
if [[ "$SKLEARN_VERSION" == "*" ]]; then
# Install latest versions of dependencies.
python -m pip install scikit-learn
else
python -m pip install numpy==$NUMPY_VERSION scipy==$SCIPY_VERSION scikit-learn==$SKLEARN_VERSION
fi
displayName: 'Install dependencies'
- script: |
set -xe
pip install -e .
displayName: 'Install scikit-learn-extra'
- script: |
set -xe
python -m pip install pytest pytest-azurepipelines pytest pytest-cov codecov
python -m pytest --durations 10 --cov=sklearn_extra sklearn_extra
displayName: 'Test'
- script: codecov -t $CODECOV_TOKEN || echo "codecov upload failed"
displayName: 'Upload coverage report'
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
- job: 'win'
pool:
vmImage: 'windows-latest'
strategy:
matrix:
Python38:
python_ver: '38'
python.version: '3.8'
NUMPY_VERSION: "1.18.2"
SCIPY_VERSION: "1.4.1"
SKLEARN_VERSION: "0.24.1"
Py39_sklearn1:
python.version: '3.9'
NUMPY_VERSION: "1.19.4"
SCIPY_VERSION: "1.5.4"
SKLEARN_VERSION: "1.0.0"
variables:
OMP_NUM_THREADS: '2'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: |
python --version
python -m pip install --upgrade pip
python -m pip install numpy==%NUMPY_VERSION% scipy==%SCIPY_VERSION% scikit-learn==%SKLEARN_VERSION%
displayName: 'Install dependencies'
- script: |
pip wheel . -w dist\
pip install --pre --no-index --find-links dist\ scikit-learn-extra
displayName: 'Install scikit-learn-extra'
- script: |
cd ..
python -m pip install pytest pytest-azurepipelines pytest-cov codecov
python -m pytest --durations 10 --pyargs --cov=sklearn_extra sklearn_extra
displayName: 'Test'
- script: codecov -t %CODECOV_TOKEN% || echo "codecov upload failed"
displayName: 'Upload coverage report'
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)