forked from pavlin-policar/openTSNE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines-release.yml
192 lines (154 loc) · 5.66 KB
/
azure-pipelines-release.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
variables:
AZURE_BUILD: true
trigger:
tags:
include:
- v*
pr: none
jobs:
- job: 'PackageWinOsx'
timeoutInMinutes: 0
cancelTimeoutInMinutes: 10
displayName: 'Build wheels ::'
pool:
vmImage: $(image.name)
strategy:
matrix:
osx - python36:
image.name: 'macos-10.13'
python.version: '3.6'
osx - python37:
image.name: 'macos-10.13'
python.version: '3.7'
windows - python36:
image.name: 'vs2017-win2016'
python.version: '3.6'
windows - python37:
image.name: 'vs2017-win2016'
python.version: '3.7'
steps:
- bash: |
case $AGENT_OS in
"Darwin") brew install libomp; echo `brew --prefix libomp` ;;
esac
displayName: 'Install openMP on OSX'
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
displayName: 'Use Python $(python.version)'
- script: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel pytest
python -m pip install numpy
displayName: 'Install job dependencies'
- script: python setup.py bdist_wheel
displayName: 'Build wheel'
# Since Python automatically adds `cwd` to `sys.path`, it's important we remove the local folder
# containing our code from the working directory. Otherwise, the tests will use the local copy
# instead of the installed package. We can easily achieve this by renaming the source folder.
- bash: mv openTSNE src
displayName: 'Remove source files from path'
- bash: ls -lRh dist
displayName: 'List built files'
- bash: python -m pip install --force-reinstall --find-links dist openTSNE
displayName: 'Install wheel'
- script: pytest -v
timeoutInMinutes: 15
displayName: 'Run unit tests'
- task: CopyFiles@2
condition: eq(variables['Agent.JobStatus'], 'Succeeded')
inputs:
contents: dist/**
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
condition: eq(variables['Agent.JobStatus'], 'Succeeded')
inputs:
artifactName: 'build'
pathtoPublish: $(Build.ArtifactStagingDirectory)
- job: 'PackageLinux'
timeoutInMinutes: 0
cancelTimeoutInMinutes: 10
displayName: 'Build wheels :: linux -'
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
python36:
python: '/opt/python/cp36-cp36m/bin'
python37:
python: '/opt/python/cp37-cp37m/bin'
container:
image: quay.io/pypa/manylinux1_x86_64:latest
options: -e PLAT=manylinux1_x86_64
steps:
- bash: $(python)/pip install --user pytest
displayName: 'Install job dependencies'
# Build and install the wheel
- bash: .ci/build_wheels.sh
displayName: 'Build wheels'
env:
PYBIN: $(python)
# Since Python automatically adds `cwd` to `sys.path`, it's important we remove the local folder
# containing our code from the working directory. Otherwise, the tests will use the local copy
# instead of the installed package. We can easily achieve this by renaming the source folder.
- bash: mv openTSNE src
displayName: 'Remove source files from path'
- script: $(python)/python -m pytest -v
timeoutInMinutes: 15
displayName: 'Run unit tests'
- bash: |
ls -lRh wheelhouse
mkdir -p dist
cp wheelhouse/openTSNE*manylinux*.whl dist/
displayName: 'Copy files to dist folder'
- task: CopyFiles@2
condition: eq(variables['Agent.JobStatus'], 'Succeeded')
inputs:
contents: dist/**
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
condition: eq(variables['Agent.JobStatus'], 'Succeeded')
inputs:
artifactName: 'build'
pathtoPublish: $(Build.ArtifactStagingDirectory)
- job: 'sdist'
timeoutInMinutes: 0
cancelTimeoutInMinutes: 10
displayName: 'Package source distribution'
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.7'
inputs:
versionSpec: '3.7'
- script: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel pytest
python -m pip install numpy
displayName: 'Install job dependencies'
- script: python setup.py sdist
displayName: 'Build sdist'
# Since Python automatically adds `cwd` to `sys.path`, it's important we remove the local folder
# containing our code from the working directory. Otherwise, the tests will use the local copy
# instead of the installed package. We can easily achieve this by renaming the source folder.
- bash: mv openTSNE src
displayName: 'Remove source files from path'
- bash: ls -lRh dist
displayName: 'List built files'
- bash: python -m pip install --force-reinstall --find-links dist openTSNE
displayName: 'Install package'
- script: pytest -v
timeoutInMinutes: 15
displayName: 'Run unit tests'
- task: CopyFiles@2
condition: eq(variables['Agent.JobStatus'], 'Succeeded')
inputs:
contents: dist/**
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
condition: eq(variables['Agent.JobStatus'], 'Succeeded')
inputs:
artifactName: 'build'
pathtoPublish: $(Build.ArtifactStagingDirectory)