-
Notifications
You must be signed in to change notification settings - Fork 10
/
azure-pipelines.yml
200 lines (189 loc) · 6.3 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
trigger:
branches:
include:
- master
- develop
- feature_prepare/**
- main
tags:
include:
- v*
variables:
TOX_PARALLEL_NO_SPINNER: 1
AZURE_PIPELINES: 1
stages:
- stage: GetTestData
jobs:
- job: linux
pool: {vmImage: 'Ubuntu-24.04'}
steps:
- script: bash build_utils/download_data.sh
displayName: "download data"
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
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: formatting_check
dependsOn: []
jobs:
- job: check_formating
pool:
vmImage: ubuntu-latest
variables:
PRE_COMMIT_HOME: $(Pipeline.Workspace)/pre-commit-cache
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- script: echo "##vso[task.setvariable variable=PY]$(python -VV)"
- task: Cache@2
inputs:
key: pre-commit | .pre-commit-config.yaml | "$(PY)"
path: $(PRE_COMMIT_HOME)
- bash: |
python -m pip install pre-commit
displayName: InstallDeps
- bash: pre-commit run --all --show-diff-on-failure
displayName: pre-commmit
- stage: manifest_check
dependsOn: []
jobs:
- job: manifest_check
pool: {vmImage: 'Ubuntu-latest'}
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- bash: |
python -m pip install check-manifest==0.50 numpy==2.0.2
displayName: InstallDeps
- bash: check-manifest
displayName: check-manifest
- stage: Documentation_check
dependsOn: []
jobs:
- job: help
pool: {vmImage: 'ubuntu-latest'}
variables:
pip_cache_dir: $(Pipeline.Workspace)/.pip
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- template: .azure-pipelines/pip_cache.yaml
parameters:
key: doc | requirements/constraints_py3.12_docs.txt | "$(PY)"
path: $(pip_cache_dir)
- bash: |
python -m pip install tox
displayName: Install tox
- bash: |
python -m tox -e docs
displayName: build docs
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: docs.tar.gz
artifactName: docs
- job: Notebook_check
pool: {vmImage: 'Ubuntu-24.04'}
continueOnError: true
variables:
DATA_PATH: typy_neuronow2
pip_cache_dir: $(Pipeline.Workspace)/.pip
steps:
- {task: UsePythonVersion@0, inputs: {versionSpec: '3.12', architecture: x64}}
- template: .azure-pipelines/pip_cache.yaml
parameters:
key: notebook | requirements/constraints_py3.12.txt | "$(PY)"
path: $(pip_cache_dir)
- bash: |
python -m pip install tox
displayName: "Install tox"
- bash: tox -e jupyter
displayName: "Run Notebook"
env:
PIP_CONSTRAINT: requirements/constraints_py3.12.txt
- stage: Tests_linux
dependsOn: [GetTestData, formatting_check]
variables:
AZURE_PIPELINES: 1
pip_cache_dir: $(Pipeline.Workspace)/.pip
jobs:
- job: test_linux
pool: { vmImage: 'ubuntu-24.04' }
variables:
AZURE_PIPELINES: 1
DISPLAY: ':99.0'
pip_cache_dir: $(Pipeline.Workspace)/.pip
steps:
- template: .azure-pipelines/linux_libs.yaml
- template: .azure-pipelines/tests.yaml
parameters:
cache_dir: $(pip_cache_dir)
- stage: Tests_other
dependsOn: [GetTestData, formatting_check]
variables:
AZURE_PIPELINES: 1
pip_cache_dir: $(Pipeline.Workspace)/.pip
jobs:
- job: test
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/heads/feature_prepare'))
strategy:
matrix:
macos:
imageName: 'macos-13'
windows:
imageName: 'windows-2019'
pool: {vmImage: $(imageName)}
steps:
- template: .azure-pipelines/tests.yaml
parameters:
cache_dir: $(pip_cache_dir)
- stage: Builds
dependsOn: GetTestData
jobs:
- job: sdist
pool: {vmImage: 'Ubuntu-22.04'}
steps:
- task: UsePythonVersion@0
- bash: pip install -r requirements/requirements_dev.txt
displayName: sdist requirements
- bash: python -m build .
displayName: sdist amd wheel
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: dist
artifactName: wheels
- job: pyinstaller_linux
variables:
test_path: dist/PartSeg/PartSeg _test
DISPLAY: ':99.0'
pip_cache_dir: $(Pipeline.Workspace)/.pip
pool: { vmImage: 'Ubuntu-20.04' }
steps:
- template: .azure-pipelines/linux_libs.yaml
- template: .azure-pipelines/pyinstaller.yaml
parameters:
test_path: $(test_path)
cache_dir: $(pip_cache_dir)
- job: pyinstaller
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/heads/feature_prepare'))
strategy:
matrix:
macos:
imageName: 'macos-13'
test_path: dist/PartSeg/PartSeg _test || dist/PartSeg/PartSeg _test || dist/PartSeg/PartSeg _test
macos_arm:
imageName: 'macos-14'
test_path: dist/PartSeg/PartSeg _test || dist/PartSeg/PartSeg _test || dist/PartSeg/PartSeg _test
windows:
imageName: 'windows-2019'
test_path: dist\PartSeg\PartSeg _test
variables:
pip_cache_dir: $(Pipeline.Workspace)/.pip
pool: {vmImage: $(imageName)}
steps:
- template: .azure-pipelines/pyinstaller.yaml
parameters:
test_path: $(test_path)
cache_dir: $(pip_cache_dir)