forked from sktime/sktime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
104 lines (99 loc) · 3.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
# author: Markus Löning
#
# adapted from
# - https://iscinumpy.gitlab.io/post/azure-devops-python-wheels/
# - https://iscinumpy.gitlab.io/post/azure-devops-releases/
variables:
REQUIREMENTS: build_tools/requirements.txt
EXCLUDE_PYTHON_VERSIONS: "2.7, 3.5, 3.9" # comma-separate string
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'
- task: Bash@3
displayName: 'Linting'
inputs:
filePath: maint_tools/linting.sh
- stage: 'Build'
dependsOn: 'Linting'
condition: succeeded('Linting')
jobs:
- job: 'manylinux'
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build_tools/azure/build_manylinux_wheels.yml
- template: build_tools/azure/publish.yml
strategy:
matrix:
64x2010: # 64 bit 2010
PLATFORM: manylinux2010_x86_64
IMAGE: quay.io/pypa/manylinux2010_x86_64
PYTHON_ARCHITECTURE: x64
64x: # 64 bit
PLATFORM: manylinux1_x86_64
IMAGE: quay.io/pypa/manylinux1_x86_64
PYTHON_ARCHITECTURE: x64
# 86x: # 32 bit
# PLATFORM: manylinux1_i686
# IMAGE: quay.io/pypa/manylinux1_i686
# PYTHON_ARCHITECTURE: x86
64x2014: # 64 bit
PLATFORM: manylinux2014_x86_64
IMAGE: quay.io/pypa/manylinux2014_x86_64
PYTHON_ARCHITECTURE: x86
- stage: 'Deploy'
dependsOn: 'Build'
condition: and(succeeded('Build'), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
jobs:
- job: 'deploy_to_pypi'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Collect wheels'
inputs:
source: 'current'
tags: '^v[0-9]+\.[0-9]+\.[0-9]+'
patterns: 'wheels_*/*manylinux*.whl'
path: 'download/'
- script: |
mkdir dist
cp download/wheels_*/*manylinux*.whl dist/
ls -lh dist/
displayName: 'Select and list wheels'
- task: UsePythonVersion@0
displayName: 'Use Python version'
inputs:
versionSpec: 3.x
- 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: |
python -m twine upload -r pypi --config-file $(PYPIRC_PATH) --non-interactive --skip-existing --verbose dist/*.whl
displayName: 'Upload wheels to PyPI'