forked from scikit-image/scikit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
110 lines (91 loc) · 3.18 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
# 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:
Python35-x64:
PYTHON_VERSION: '3.5'
ARCH: 'x64'
PIP_FLAGS: ''
Python36:
PYTHON_VERSION: '3.6'
ARCH: 'x86'
PIP_FLAGS: ''
Python36-x64:
PYTHON_VERSION: '3.6'
ARCH: 'x64'
PIP_FLAGS: ''
Python37:
PYTHON_VERSION: '3.7'
ARCH: 'x86'
PIP_FLAGS: ''
Python37-x64:
PYTHON_VERSION: '3.7'
ARCH: 'x64'
PIP_FLAGS: ''
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'
- script: |
@echo on
:: 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'
- script: |
@echo on
:: Get stdint headers needed by tifffile.c
curl https://raw.githubusercontent.com/chemeris/msinttypes/master/inttypes.h -o skimage/external/tifffile/inttypes.h
curl https://raw.githubusercontent.com/chemeris/msinttypes/master/stdint.h -o skimage/external/tifffile/stdint.h
:: Compile the package and build the wheel
python setup.py bdist_wheel
:: Install the generated wheel package
dir dist
pip install %PIP_FLAGS% --no-index --find-links dist/ scikit-image
displayName: 'Installation'
- script: |
@echo on
:: Install the test dependencies
pip install %PIP_FLAGS% --retries 3 -r requirements/test.txt
pip list
displayName: 'Pre-testing'
- script: |
@echo on
:: Default working directory, where the source code is located,
:: is D:\a\1\s or similar. In order to run the tests on the installed
:: version of skimage, a different working directory is used.
:: Use the Agg backend in Matplotlib
echo backend ^: Agg > matplotlibrc
echo "Running tests on the following version of scikit-image:"
python -c "import skimage; print(skimage.__path__)"
:: Run unit tests with pytest
pytest -v --pyargs skimage
:: [For further consideration]
:: # -- Build the docs
:: # -- Publish the .whl artifacts
:: # -- Upload the content of dist/*.whl to a public wheelhouse
workingDirectory: $(Agent.ToolsDirectory)
displayName: 'Testing'