This repository has been archived by the owner on Dec 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
azure-pipelines.yml
237 lines (197 loc) · 7.55 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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
trigger:
# branch names
- master
- develop
# Set variables once
variables:
# use `latest-dev` in dev mode
release_tag: 'latest-dev'
release_title: 'Latest Development'
release_notes_file: './docs/source/version-history/dev.rst'
# update the following in release mode
# release_tag: '2019a'
# release_title: '2019a Release'
# release_notes_file: './docs/source/version-history/v2019a.rst'
resources:
- repo: self
jobs:
- job: macOS
displayName: Agent macOS
condition: succeeded()
pool:
vmImage: 'macOS-10.15'
steps:
# Use Python Version
# Retrieves the specified version of Python from the tool cache. Optionally add it to PATH.
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- script: 'brew update; brew install gcc'
displayName: 'install gcc+gfortran'
continueOnError: true
- script: |
make release
make test
displayName: 'prepare release'
continueOnError: true
- task: GithubRelease@0
inputs:
gitHubConnection: new GitHub connection
repositoryName: Urban-Meteorology-Reading/SUEWS
assets: ./Release/*.zip
action: 'Edit'
target: '$(build.sourceVersion)'
tagSource: 'manual' # 'auto'
tag: $(release_tag) # Required when action == edit || action == discard || tagSource == manual
title: $(release_title)
releaseNotesSource: file
releaseNotesFile: $(release_notes_file)
assetUploadMode: 'replace'
isDraft: true
isPrerelease: false
addChangeLog: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
addToPath: true
architecture: 'x64'
- script: 'make driver'
displayName: 'make supy_driver'
continueOnError: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- script: 'make driver'
displayName: 'make supy_driver'
continueOnError: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
addToPath: true
architecture: 'x64'
- script: 'make driver'
displayName: 'make supy_driver'
continueOnError: true
- task: TwineAuthenticate@0
inputs:
# artifactFeeds: 'feed_name1, feed_name2'
externalFeeds: 'PyPI'
- script: |
twine upload -r SuPy --config-file $(PYPIRC_PATH) --skip-existing supy-driver/dist/*whl
displayName: 'upload supy_driver'
continueOnError: true
- job: Windows
displayName: Agent Windows
condition: succeeded()
pool:
name: Hosted VS2017
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- bash: |
make release
displayName: 'prepare release suews'
failOnStderr: false
- task: GithubRelease@0
inputs:
gitHubConnection: new GitHub connection
repositoryName: Urban-Meteorology-Reading/SUEWS
assets: ./Release/*.zip
action: 'Edit'
target: '$(build.sourceVersion)'
tagSource: 'manual' # 'auto'
tag: $(release_tag) # Required when action == edit || action == discard || tagSource == manual
title: $(release_title)
assetUploadMode: 'replace'
isDraft: true
isPrerelease: false
addChangeLog: false
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
addToPath: true
architecture: 'x64'
- script: 'make driver'
displayName: 'make supy_driver'
continueOnError: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- script: 'make driver'
displayName: 'make supy_driver'
continueOnError: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
addToPath: true
architecture: 'x64'
- script: 'make driver'
displayName: 'make supy_driver'
continueOnError: true
- task: TwineAuthenticate@0
inputs:
# artifactFeeds: 'feed_name1, feed_name2'
externalFeeds: 'PyPI'
- script: |
twine upload -r SuPy --config-file $(PYPIRC_PATH) --skip-existing supy-driver/dist/*whl
displayName: 'upload supy_driver'
continueOnError: true
- job: Linux
displayName: Agent Linux
condition: succeeded()
pool:
name: Hosted Ubuntu 1604
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- script: |
sudo apt-get update
sudo apt-get install build-essential gfortran
gfortran --version
gfortran-5 --version
displayName: 'install gfortran'
continueOnError: true
- script: |
make release
displayName: 'prepare release'
continueOnError: true
- task: GithubRelease@0
inputs:
gitHubConnection: new GitHub connection
repositoryName: Urban-Meteorology-Reading/SUEWS
assets: ./Release/*.zip
action: 'Edit'
target: '$(build.sourceVersion)'
tagSource: 'manual' # 'auto'
tag: $(release_tag) # Required when action == edit || action == discard || tagSource == manual
title: $(release_title)
assetUploadMode: 'replace'
isDraft: true
isPrerelease: false
addChangeLog: false
- task: TwineAuthenticate@0
inputs:
# artifactFeeds: 'feed_name1, feed_name2'
externalFeeds: 'PyPI'
- script: |
pip install twine
docker run -v $(pwd):/io dockcross/manylinux1-x64 bash -c "cd /io/supy-driver;gfortran --version; make clean;make suews"
docker run -v $(pwd):/io dockcross/manylinux1-x64 bash -c "cd /io/supy-driver;/opt/python/cp36-cp36m/bin/python -m pip install -r requirements.txt; /opt/python/cp36-cp36m/bin/python -m pip install numpy==1.15.4; /opt/python/cp36-cp36m/bin/python setup.py bdist_wheel; ls -lrt *; ls -lrt dist/*; ls -lrt wheelhouse/*"
docker run -v $(pwd):/io dockcross/manylinux1-x64 bash -c "cd /io/supy-driver;/opt/python/cp37-cp37m/bin/python -m pip install -r requirements.txt; /opt/python/cp37-cp37m/bin/python -m pip install numpy==1.15.4; /opt/python/cp37-cp37m/bin/python setup.py bdist_wheel; ls -lrt *; ls -lrt dist/*; ls -lrt wheelhouse/*"
docker run -v $(pwd):/io dockcross/manylinux1-x64 bash -c "cd /io/supy-driver;/opt/python/cp38-cp38/bin/python -m pip install -r requirements.txt; /opt/python/cp38-cp38/bin/python -m pip install numpy==1.15.4; /opt/python/cp38-cp38/bin/python setup.py bdist_wheel; ls -lrt *; ls -lrt dist/*; ls -lrt wheelhouse/*"
cd supy-driver
twine upload -r SuPy --config-file $(PYPIRC_PATH) --skip-existing wheelhouse/*whl
displayName: 'manylinux supy_driver build and upload'
continueOnError: true