forked from scikit-image/scikit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
153 lines (127 loc) · 4.14 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
# Azure Pipelines configuration file for Continuous Integration
# for building the package and running the tests under Windows.
jobs:
- job: 'Default'
pool:
vmImage: 'vs2017-win2016'
strategy:
maxParallel: 10
matrix:
Python36:
PYTHON_VERSION: '3.6'
ARCH: 'x86'
PIP_FLAGS: ''
Python36-x64:
PYTHON_VERSION: '3.6'
ARCH: 'x64'
PIP_FLAGS: ''
BUILD_DOCS: 'true'
Python37:
PYTHON_VERSION: '3.7'
ARCH: 'x86'
PIP_FLAGS: ''
Python37-x64:
PYTHON_VERSION: '3.7'
ARCH: 'x64'
PIP_FLAGS: ''
TEST_EXAMPLES: 'true'
Python38:
PYTHON_VERSION: '3.8'
ARCH: 'x86'
PIP_FLAGS: ''
Python38-x64:
PYTHON_VERSION: '3.8'
ARCH: 'x64'
PIP_FLAGS: ''
TEST_EXAMPLES: 'true'
Python37-x64-pre:
PYTHON_VERSION: '3.7'
ARCH: 'x64'
PIP_FLAGS: '--pre'
continueOnError: false
timeoutInMinutes: 60
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(PYTHON_VERSION)'
architecture: '$(ARCH)'
- powershell: |
Write-Host "##vso[task.setvariable variable=PATH;]${env:PYTHON};${env:PYTHON}\Scripts;${env:PATH}";
displayName: 'Add Python paths to PATH'
- bash: |
set -x
# Update pip
python -m pip install --retries 3 -U pip setuptools
# Check that we have the expected version and architecture for Python
python --version
pip --version
python -c "import struct; print('Void pointer width is', struct.calcsize('P') * 8)"
pip list
# Install the build and runtime dependencies of the project
pip install ${PIP_FLAGS} --retries 3 -r requirements/default.txt
pip install ${PIP_FLAGS} --retries 3 -r requirements/build.txt
pip list
displayName: 'Pre-installation'
- bash: |
set -x
# Compile the package and build the wheel
python setup.py bdist_wheel
# Install the generated wheel package
ls dist
pip install ${PIP_FLAGS} --no-index --find-links dist/ scikit-image
displayName: 'Installation'
- bash: |
set -x
# Install the test dependencies
pip install ${PIP_FLAGS} --retries 3 -r requirements/test.txt
pip list
# Set non-UI Matplotlib backend
cd ${AGENT_BUILDDIRECTORY} # D:\a\1
echo "backend : Agg" > matplotlibrc
displayName: 'Pre-testing'
- bash: |
set -x
# Change the working directory in order to run the tests
# on the installed version of skimage
cd ${AGENT_BUILDDIRECTORY} # D:\a\1
# Show the info about the installed scikit-image
python -c "import skimage; print(skimage.__path__)"
# Force matplotlib to use the prepared config
export MATPLOTLIBRC=${AGENT_BUILDDIRECTORY}
# Run unit tests with pytest
# We don't test docstring examples (--doctest-modules) on
# Windows due to inconsistent ndarray formatting in `numpy`.
# For more details, see https://github.com/numpy/numpy/issues/13468
export TEST_ARGS="-v --cov=skimage"
pytest ${TEST_ARGS} --pyargs skimage
displayName: 'Package testing'
- bash: |
set -x
# Install the doc dependencies
pip install ${PIP_FLAGS} --retries 3 -q -r requirements/docs.txt
pip list
# Build the documentation
export SPHINXCACHE=${AGENT_BUILDDIRECTORY}/.cache/sphinx
make html
condition: eq(variables['BUILD_DOCS'], 'true')
displayName: 'Documentation testing'
- bash: |
set -x
# Install the doc dependencies
pip install ${PIP_FLAGS} --retries 3 -q -r requirements/docs.txt
pip list
# Force matplotlib to use the prepared config
export MATPLOTLIBRC=${AGENT_BUILDDIRECTORY}
# Run example applications
for f in doc/examples/*/*.py; do
python "${f}"
if [ $? -ne 0 ]; then
exit 1
fi
done
condition: eq(variables['TEST_EXAMPLES'], 'true')
displayName: 'Gallery testing'
# - bash: |
# # -- Publish the .whl artifacts
# # -- Upload the content of dist/*.whl to a public wheelhouse
# displayName: 'Further consideration'