-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yaml
222 lines (187 loc) · 6.96 KB
/
azure-pipelines.yaml
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
212
213
214
215
216
217
218
219
220
221
222
trigger:
branches:
include:
- master
- release/*
tags:
include:
- v*
variables:
IMAGECODECS_CIBW: 1
AEC_TEST_EXTENDED: 1
BASE_PATH: $(Build.Repository.LocalPath)
LD_LIBRARY_PATH: $(Build.Repository.LocalPath)/build_utils/libs_build/lib
MACOSX_RPATH: $LD_LIBRARY_PATH
# CIBW_BUILD: "cp3[8-10]*"
stages:
- stage: GetLibsSrc
jobs:
- job: linux
pool: { vmImage: "Ubuntu-22.04" }
steps:
- bash: bash build_utils/download_libraries.sh
displayName: "Download libraries"
- bash: tar czf libraries.tgz build_utils/libs_src
displayName: "Create archive"
- publish: libraries.tgz
artifact: LibsSrc_tar
- stage: BuildLinux
dependsOn: [GetLibsSrc]
jobs:
- job: linux_test_build
pool: { vmImage: "Ubuntu-22.04" }
variables:
IMCD_SKIP_JPEG12: 1
steps:
- checkout: self
submodules: true
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: "Use Python 3.8"
- bash: |
sudo apt-get -y update
sudo apt-get -y install nasm autopoint libsnappy-dev meson nasm ninja-build
displayName: "install build tools"
- task: DownloadPipelineArtifact@2
inputs:
artifact: LibsSrc_tar
path: $(Build.SourcesDirectory)
- bash: tar -xf libraries.tgz
displayName: "Unpack"
- bash: bash build_utils/build_libraries.sh
displayName: "build libraries"
- script: |
python -m pip install --upgrade pip
python -m pip install numpy cython wheel
displayName: "Install dependencies"
- bash: pip install -r requirements_azure.txt
displayName: "install test dependencies"
- script: pip install -e imagecodecs_src
displayName: "install package"
- script: pytest imagecodecs_src/tests --timeout=300
displayName: "run test"
- stage: BuildMacos
dependsOn: [GetLibsSrc]
jobs:
- job: macos_test_build
pool: { vmImage: "macos-11" }
timeoutInMinutes: 100
variables:
LIBRARY_PATH: $(LD_LIBRARY_PATH)
LD_RUNPATH_SEARCH_PATH: $(LD_LIBRARY_PATH)
DYLD_FALLBACK_LIBRARY_PATH: $(LD_LIBRARY_PATH)
SKIP_OMP: 1
IMCD_SKIP_JPEG12: 1
CC: clang
CXX: clang++
steps:
- checkout: self
submodules: true
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: "Use Python 3.8"
- bash: brew install pcre openssl nasm automake libtool snappy ninja meson cmake
displayName: "install build tools"
# - bash: bash build_utils/build_libomp.sh
# displayName: "build and install libomp"
- task: DownloadPipelineArtifact@2
inputs:
artifact: LibsSrc_tar
path: $(Build.SourcesDirectory)
- bash: tar -xf libraries.tgz
displayName: "Unpack"
- bash: |
bash build_utils/build_libraries.sh
displayName: "build libraries"
- bash: bash build_utils/fix_macos_lib.sh
displayName: "Fix libraries load path"
- bash: ls build_utils/libs_build/lib/*
displayName: "show install result"
- script: |
python -m pip install --upgrade pip
python -m pip install numpy cython wheel
displayName: "Install dependencies"
- bash: pip install -e ./imagecodecs_src
displayName: "Install project"
#- bash: pip install ${CIBW_TEST_REQUIRES}
# displayName: "install test dependencies"
#- script: pytest imagecodecs_src/tests --timeout=300
# displayName: "run test"
- job: macos_wheel
pool: { vmImage: "macos-11" }
timeoutInMinutes: 150
variables:
LIBRARY_PATH: $(LD_LIBRARY_PATH)
DYLD_LIBRARY_PATH: $(LD_LIBRARY_PATH)
LD_RUNPATH_SEARCH_PATH: $(LD_LIBRARY_PATH)
DYLD_FALLBACK_LIBRARY_PATH: $(LD_LIBRARY_PATH)
MACOSX_DEPLOYMENT_TARGET: "10.9"
SKIP_OMP: 1
IMCD_SKIP_JPEG12: 1
CC: clang
CXX: clang++
steps:
- checkout: self
submodules: true
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: "Use Python 3.8"
- bash: brew install pcre openssl nasm automake libtool pkg-config snappy ninja meson cmake
displayName: "install build tools"
# - bash: bash build_utils/build_libomp.sh
# displayName: "build and install libomp"
- task: DownloadPipelineArtifact@2
inputs:
artifact: LibsSrc_tar
path: $(Build.SourcesDirectory)
- bash: tar -xf libraries.tgz
displayName: "Unpack"
- bash: |
bash build_utils/build_libraries.sh
displayName: "build libraries"
- bash: bash build_utils/fix_macos_lib.sh
displayName: "Fix libraries load path"
- script: |
python -m pip install --upgrade pip
python -m pip install numpy cython
python -m pip install cibuildwheel
displayName: "Install dependencies"
- script: cibuildwheel ./imagecodecs_src --config-file pyproject.toml
displayName: "cibuildwheel"
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: wheelhouse
artifactName: wheels
- stage: BuildManylinux
dependsOn: []
jobs:
- job: linux_wheel
timeoutInMinutes: 150
strategy:
matrix:
manylinux2014_x86_64:
CIBW_SKIP: "*686 pp37* cp37* *-musllinux_x86_64"
manylinux2014_i686:
CIBW_SKIP: "*64 pp* cp37* cp310* *-musllinux_i686"
pool: { vmImage: "Ubuntu-20.04" }
steps:
- checkout: self
submodules: true
- task: UsePythonVersion@0
inputs:
versionSpec: "3.8"
displayName: "Use Python 3.8"
- script: |
python -m pip install --upgrade pip
python -m pip install numpy cython
python -m pip install cibuildwheel
displayName: "Install dependencies"
- script: cibuildwheel ./imagecodecs_src --config-file pyproject.toml
displayName: "cibuildwheel"
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: wheelhouse
artifactName: wheels