forked from sktime/sktime-dl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
169 lines (162 loc) · 5.29 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
# author: Markus Löning
# runs continuous integration checks for commits and PRs
# adapted from
# - https://iscinumpy.gitlab.io/post/azure-devops-python-wheels/
# - https://iscinumpy.gitlab.io/post/azure-devops-releases/
name: CI.$(Date:yyyyMMdd).$(Rev:r)
variables:
REQUIREMENTS: build_tools/requirements.txt
TEST_DIR: tmp/
TEST_SLOW: false # whether or not to run slow tests
trigger:
branches:
include:
- master
- dev
tags:
include:
- '*'
pr:
# Cancel if new commits are pushed to the same PR
autoCancel: true
stages:
- stage: 'Linting'
jobs:
- job: 'Linting'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python version'
inputs:
versionSpec: 3.x
- script: pip install flake8
displayName: 'Installing flake8'
- bash: maint_tools/linting.sh
displayName: 'Linting'
- stage: 'Build'
dependsOn: 'Linting'
condition: succeeded('Linting')
jobs:
- job: 'Linux_latest'
pool:
vmImage: 'ubuntu-latest'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Add conda to PATH'
- template: build_tools/azure/build_and_test.yml
strategy:
matrix:
py36_tf19:
PYTHON_VERSION: 3.6
TF_VERSION: 1.9
py36_tf115:
PYTHON_VERSION: 3.6
TF_VERSION: 1.15
py37_tf21:
PYTHON_VERSION: 3.7
TF_VERSION: 2.1
# runs all checks, including slow ones, to check if we can still
# reproduce published results
py37_tf23:
PYTHON_VERSION: 3.7
TF_VERSION: 2.3
TEST_SLOW: true
- job: 'Linux_xenial'
pool:
vmImage: 'ubuntu-16.04'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Add conda to PATH'
- template: build_tools/azure/build_and_test.yml
strategy:
matrix:
py36_tf19:
PYTHON_VERSION: 3.6
TF_VERSION: 1.9
- job: 'Windows'
timeoutInMinutes: 120 # use 0 set to time out to maximum
pool:
vmImage: 'vs2017-win2016'
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: 'Add conda to PATH'
- template: build_tools/azure/build_and_test.yml
strategy:
matrix:
py36_tf19:
PYTHON_VERSION: 3.6
TF_VERSION: 1.9
py36_tf115:
PYTHON_VERSION: 3.6
TF_VERSION: 1.15
py37_tf21:
PYTHON_VERSION: 3.7
TF_VERSION: 2.1
py37_tf23:
PYTHON_VERSION: 3.7
TF_VERSION: 2.3
- job: 'macOS_latest'
pool:
vmImage: 'macOS-latest'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Add conda to PATH'
- bash: sudo chown -R $USER $CONDA
displayName: 'Take ownership of conda installation'
- template: build_tools/azure/build_and_test.yml
strategy:
matrix:
py36_tf115:
PYTHON_VERSION: 3.6
TF_VERSION: 1.15
- job: 'macOS_mojave'
pool:
vmImage: 'macOS-10.14'
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Add conda to PATH'
- bash: sudo chown -R $USER $CONDA
displayName: 'Take ownership of conda installation'
- template: build_tools/azure/build_and_test.yml
strategy:
matrix:
py36_tf19:
PYTHON_VERSION: 3.6
TF_VERSION: 1.9
- stage: 'Deploy'
dependsOn: 'Build'
condition: and(succeeded('Build'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
jobs:
- job: 'deploy_to_pypi'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Collect wheels'
inputs:
source: 'specific'
project: 'sktime-dl'
pipeline: 'alan-turing-institute.sktime-dl'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
tags: '^v[0-9]\.[0-9]\.[0-9]$'
patterns: 'wheels_*/*.whl'
path: 'download/'
- script: |
mkdir dist
cp download/wheels_*/*.whl dist/
ls -lh dist/
displayName: 'Select and list wheels'
- script: |
pip install --upgrade twine
displayName: 'Install twine'
# - task: TwineAuthenticate@1
# displayName: 'Twine Authenticate'
# inputs:
# # configured in https://dev.azure.com/<user>/<project>/_settings/adminservices
# pythonUploadServiceConnection: PyPI
# - script: |
# ls -lh dist/*.whl
# # twine upload -r pypi --config-file $(PYPIRC_PATH) --skip-existing --verbose dist/*.whl
# displayName: 'Upload wheels to PyPI'