-
Notifications
You must be signed in to change notification settings - Fork 11
/
azure-pipelines.yml
211 lines (200 loc) · 7.33 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
trigger:
branches:
include:
- '*'
exclude:
- dependabot/*
tags:
include:
- v*
variables:
TOX_PARALLEL_NO_SPINNER: 1
stages:
- stage: GetTestData
jobs:
- job: linux
pool: {vmImage: 'Ubuntu-16.04'}
steps:
- script: bash .travis/install2.sh
displayName: "download data"
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
displayName: 'Use Python $(python.version)'
- script: python build_utils/cut_changelog.py changelog_cut.md
displayName: "Cut changelog"
- publish: test_data
artifact: TestData
- publish: changelog_cut.md
artifact: ReleaseInfo
- stage: formating_check
dependsOn: []
jobs:
- job: check_formating
pool: {vmImage: 'Ubuntu-16.04'}
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- bash: |
python -m pip install black flake8
displayName: InstallDeps
- bash: black --check .
displayName: Black
- bash: flake8 .
displayName: flake8
- stage: Tests
dependsOn: [GetTestData, formating_check]
jobs:
- job: test
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
macos:
imageName: 'macos-10.14'
windows:
imageName: 'vs2017-win2016'
pool: {vmImage: $(imageName)}
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7'}}
- script: sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0
condition: "startsWith(variables['imageName'], 'ubuntu')"
displayName: "install libs"
- task: DownloadPipelineArtifact@2
inputs:
artifact: TestData
path: $(Build.SourcesDirectory)/test_data
- script: pip install -r requirements/requirements_dev.txt
displayName: "Install deps"
- script: tox -c tox-azure.ini -e py37-PyQt5
displayName: "Run Tox"
- stage: Builds
dependsOn: Tests
variables:
CIBW_BEFORE_BUILD: pip install numpy cython
CIBW_TEST_EXTRAS: pyqt,test
CIBW_BUILD: cp3[6-8]*64
jobs:
- job: wheel_manylinux2010
pool: {vmImage: 'Ubuntu-16.04'}
variables:
CIBW_BEFORE_BUILD: pip install numpy cython; yum -y install hdf5-devel;
CIBW_TEST_REQUIRES: pytest pytest-cov
CIBW_TEST_COMMAND: pytest {project}/package/tests --ignore={project}/package/tests/test_qt_part
CIBW_BEFORE_TEST: pip install PyQt5==5.13.2
CIBW_TEST_EXTRAS: ""
steps:
- task: UsePythonVersion@0
- task: DownloadPipelineArtifact@2
inputs:
artifact: TestData
path: $(Build.SourcesDirectory)/test_data
- bash: python -m pip install cibuildwheel cython numpy
displayName: InstallDeps
- bash: python -m cibuildwheel
displayName: BuildWheel
- bash: pip install -r requirements/requirements_dev.txt
displayName: sdist requirements
- bash: python setup.py sdist -d wheelhouse
displayName: sdist
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: wheelhouse
artifactName: wheels
- job: wheel
strategy:
matrix:
manylinux2014:
imageName: 'ubuntu-16.04'
macos:
imageName: 'macos-10.14'
macos14:
imageName: 'macos-10.14'
MACOSX_DEPLOYMENT_TARGET: "10.14"
windows:
imageName: 'vs2017-win2016'
pool: {vmImage: $(imageName)}
variables:
CIBW_BEFORE_BUILD_LINUX: pip install numpy cython; yum -y install hdf5-devel;
CIBW_TEST_COMMAND_LINUX: pytest {project}/package/tests --ignore={project}/package/tests/test_qt_part
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_TEST_COMMAND: pytest {project}/package/tests
MACOSX_DEPLOYMENT_TARGET: "10.9"
steps:
- task: UsePythonVersion@0
- task: DownloadPipelineArtifact@2
inputs:
artifact: TestData
path: $(Build.SourcesDirectory)/test_data
- bash: python -m pip install cibuildwheel cython numpy
displayName: InstallDeps
- bash: python -m cibuildwheel
displayName: BuildWheel
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: wheelhouse
artifactName: wheels
- job: pyinstaller
strategy:
matrix:
linux:
imageName: 'ubuntu-16.04'
test_path: xvfb-run dist/PartSeg/PartSeg _test
macos:
imageName: 'macos-10.14'
test_path: dist/PartSeg.app/Contents/MacOS/PartSeg _test
windows:
imageName: 'vs2017-win2016'
test_path: dist\PartSeg\PartSeg _test
pool: {vmImage: $(imageName)}
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- bash: |
python -m pip install -r requirements/requirements_pyinstaller.txt
python -m pip install -e .
python build_utils/create_and_pack_executable.py
- script: sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0
condition: "startsWith(variables['imageName'], 'ubuntu')"
displayName: "install libs"
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: dist2
artifactName: execs
- script: $(test_path)
displayName: TestBuild
- stage: Documentation_check
dependsOn: []
jobs:
- job: help
pool: {vmImage: 'Ubuntu-16.04'}
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- bash: |
python -m pip install -r requirements/requirements_pyinstaller.txt
python -m pip install -r requirements/requirements_dev.txt
python -m pip install .
python -m pip install -r docs/requirements.txt
displayName: InstallDeps
- bash: make -C docs html
displayName: BuildDocs
- bash: |
mkdir docs_result
cd docs/_build; zip -r ../../docs_result/PartSeg_documentation_`python -c "import PartSeg; print(PartSeg.__version__)"`.zip html; cd ../..
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: docs_result
artifactName: docs
- job: Notebook_check
pool: {vmImage: 'Ubuntu-16.04'}
continueOnError: true
variables:
DATA_PATH: typy_neuronow2
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.7', architecture: x64}}
- bash: |
python -m pip install -r requirements_pyinstaller.txt
python -m pip install .
python -m pip install jupyter[all]
python -m pip install matplotlib
displayName: InstallDeps
- bash: DATA_PATH=${PWD}/typy_neuronow2 jupyter nbconvert --to notebook --execute tutorials/tutorial_neuron_types/Neuron_types_example.ipynb
displayName: "Run Notebook"