Skip to content

Commit 388c65b

Browse files
authored
Backport azure (#4159)
1 parent 53f0eeb commit 388c65b

15 files changed

+601
-166
lines changed

.appveyor.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ test_script:
3333
after_test:
3434
- "tools/build.cmd %PYTHON%\\python.exe -m codecov -f coverage.xml -X gcov"
3535

36-
artifacts:
37-
- path: dist\*
38-
39-
deploy_script:
40-
- ps: >-
41-
if($env:appveyor_repo_tag -eq 'True') {
42-
Invoke-Expression "$env:PYTHON\\python.exe -m twine upload dist/* --username $env:PYPI_USER --password $env:PYPI_PASSWD --skip-existing"
43-
}
36+
# artifacts:
37+
# - path: dist\*
38+
39+
# deploy_script:
40+
# - ps: >-
41+
# if($env:appveyor_repo_tag -eq 'True') {
42+
# Invoke-Expression "$env:PYTHON\\python.exe -m twine upload dist/* --username $env:PYPI_USER --password $env:PYPI_PASSWD --skip-existing"
43+
# }
4444

4545
#notifications:
4646
# - provider: Webhook

.azure-pipelines/ci.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
trigger:
2+
batch: true
3+
branches:
4+
include:
5+
- master
6+
- ?.?* # matches to backport branches, e.g. 3.6
7+
exclude:
8+
- refs/tags/*
9+
pr:
10+
autoCancel: true
11+
branches:
12+
include:
13+
- master
14+
15+
variables:
16+
- group: codecov
17+
18+
stages:
19+
- template: stage-lint.yml
20+
- template: stage-test.yml
21+
parameters:
22+
codecov.token: '$(codecov.token)'

.azure-pipelines/deploy.yml

+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
trigger:
2+
branches:
3+
include:
4+
- refs/tags/*
5+
pr: none
6+
7+
8+
variables:
9+
- group: codecov
10+
- group: twine
11+
12+
13+
resources:
14+
containers:
15+
- container: manylinux
16+
image: quay.io/pypa/manylinux1_x86_64
17+
repositories:
18+
- repository: templates
19+
type: github
20+
name: aio-libs/azure-pipelines
21+
endpoint: aio-libs
22+
23+
stages:
24+
- template: stage-lint.yml
25+
26+
- template: stage-test.yml
27+
parameters:
28+
codecov.token: '$(codecov.token)'
29+
30+
- stage: build
31+
displayName: 'Build'
32+
33+
jobs:
34+
- job: tarball
35+
displayName: 'Tarball'
36+
pool:
37+
vmImage: 'ubuntu-latest'
38+
39+
steps:
40+
- template: templates/step-build.yml@templates
41+
parameters:
42+
steps:
43+
- script: |
44+
make cythonize
45+
displayName: 'Cythonize'
46+
- script: |
47+
python setup.py sdist
48+
displayName: 'Make tarball'
49+
50+
- job: manylinux
51+
displayName: 'Manylinux'
52+
strategy:
53+
matrix:
54+
py35 x64:
55+
python.code: 'cp35-cp35m'
56+
manylinux: 'manylinux_64'
57+
py36 x64:
58+
python.code: 'cp36-cp36m'
59+
manylinux: 'manylinux_64'
60+
py37 x64:
61+
python.code: 'cp37-cp37m'
62+
manylinux: 'manylinux_64'
63+
pool:
64+
vmImage: 'ubuntu-latest'
65+
container: manylinux
66+
steps:
67+
- checkout: self
68+
submodules: true
69+
clean: true
70+
71+
- script: |
72+
/opt/python/$(python.code)/bin/python -m venv .build-venv
73+
displayName: 'Use Python $(python.code)'
74+
75+
- script: |
76+
source .build-venv/bin/activate
77+
pip install -U setuptools wheel
78+
displayName: 'Install tools'
79+
80+
- script: |
81+
source .build-venv/bin/activate
82+
make cythonize
83+
python setup.py bdist_wheel
84+
displayName: 'Make wheel'
85+
86+
- script: |
87+
auditwheel repair dist/*.whl --wheel-dir wheelhouse/
88+
displayName: 'Repair wheel'
89+
90+
- template: templates/step-store-dist.yml@templates
91+
parameters:
92+
folder: wheelhouse
93+
94+
- job:
95+
strategy:
96+
matrix:
97+
Win py35 x64:
98+
python.version: '3.5'
99+
python.architecture: 'x64'
100+
image: 'windows-latest'
101+
Win py36 x64:
102+
python.version: '3.6'
103+
python.architecture: 'x64'
104+
image: 'windows-latest'
105+
Win py37 x64:
106+
python.version: '3.7'
107+
python.architecture: 'x64'
108+
image: 'windows-latest'
109+
Win py35 x86:
110+
python.version: '3.5'
111+
python.architecture: 'x86'
112+
image: 'windows-latest'
113+
Win py36 x86:
114+
python.version: '3.6'
115+
python.architecture: 'x86'
116+
image: 'windows-latest'
117+
Win py37 x86:
118+
python.version: '3.7'
119+
python.architecture: 'x86'
120+
image: 'windows-latest'
121+
Mac py35:
122+
python.version: '3.5'
123+
image: 'macos-latest'
124+
python.architecture: 'x64'
125+
Mac py36:
126+
python.version: '3.6'
127+
image: 'macos-latest'
128+
python.architecture: 'x64'
129+
Mac py37:
130+
python.version: '3.7'
131+
image: 'macos-latest'
132+
python.architecture: 'x64'
133+
pool:
134+
vmImage: '$(image)'
135+
steps:
136+
- template: templates/step-build.yml@templates
137+
parameters:
138+
python: '$(python.version)'
139+
architecture: '$(python.architecture)'
140+
steps:
141+
- script: |
142+
make cythonize
143+
python setup.py bdist_wheel
144+
displayName: 'Make wheel'
145+
146+
- template: templates/stage-publish.yml@templates
147+
parameters:
148+
github: release-upload

.azure-pipelines/stage-lint.yml

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
stages:
2+
- stage: lint
3+
displayName: 'Run linters'
4+
5+
jobs:
6+
- job: 'flake8'
7+
pool:
8+
vmImage: 'ubuntu-latest'
9+
10+
steps:
11+
- checkout: self
12+
submodules: true
13+
clean: true
14+
15+
- task: UsePythonVersion@0
16+
inputs:
17+
versionSpec: '3.7'
18+
architecture: 'x64'
19+
20+
- script: |
21+
pip install -r requirements/lint.txt
22+
displayName: 'Install deps'
23+
24+
- script: |
25+
make flake8
26+
displayName: 'Run flake8'
27+
28+
- job: 'isort'
29+
pool:
30+
vmImage: 'ubuntu-latest'
31+
32+
steps:
33+
- checkout: self
34+
submodules: true
35+
clean: true
36+
37+
- task: UsePythonVersion@0
38+
inputs:
39+
versionSpec: '3.7'
40+
architecture: 'x64'
41+
42+
- script: |
43+
pip install -e .
44+
displayName: 'Install itself'
45+
env:
46+
AIOHTTP_NO_EXTENSIONS: 1
47+
48+
- script: |
49+
pip install -r requirements/lint.txt
50+
displayName: 'Install deps'
51+
52+
- script: |
53+
make isort-check
54+
displayName: 'Run isort checker'
55+
56+
- job: 'mypy'
57+
pool:
58+
vmImage: 'ubuntu-latest'
59+
60+
steps:
61+
- checkout: self
62+
submodules: true
63+
clean: true
64+
65+
- task: UsePythonVersion@0
66+
inputs:
67+
versionSpec: '3.7'
68+
architecture: 'x64'
69+
70+
- script: |
71+
pip install -r requirements/lint.txt
72+
displayName: 'Install deps'
73+
74+
- script: |
75+
pip install -e .
76+
displayName: 'Install itself'
77+
env:
78+
AIOHTTP_NO_EXTENSIONS: 1
79+
80+
- script: |
81+
make mypy
82+
displayName: 'Run black checker'
83+
84+
- job: 'docs'
85+
pool:
86+
vmImage: 'ubuntu-latest'
87+
88+
steps:
89+
- checkout: self
90+
submodules: true
91+
clean: true
92+
93+
- task: UsePythonVersion@0
94+
inputs:
95+
versionSpec: '3.7'
96+
architecture: 'x64'
97+
98+
- script: |
99+
apt install libenchant-dev
100+
pip install -r requirements/doc-spelling.txt
101+
displayName: 'Install deps'
102+
103+
- script: |
104+
make doc
105+
displayName: 'Run docs checker'
106+
env:
107+
AIOHTTP_NO_EXTENSIONS: 1
108+
109+
- job: 'twine'
110+
pool:
111+
vmImage: 'ubuntu-latest'
112+
113+
steps:
114+
- checkout: self
115+
submodules: true
116+
clean: true
117+
118+
- task: UsePythonVersion@0
119+
inputs:
120+
versionSpec: '3.7'
121+
architecture: 'x64'
122+
123+
- script: |
124+
pip install -U twine wheel
125+
python setup.py sdist bdist_wheel
126+
displayName: 'Install deps'
127+
env:
128+
AIOHTTP_NO_EXTENSIONS: 1
129+
130+
- script: |
131+
twine check dist/*
132+
displayName: 'Run twine checker'
133+
134+
- job: 'contributors'
135+
pool:
136+
vmImage: 'ubuntu-latest'
137+
138+
steps:
139+
- script: |
140+
LC_ALL=C sort -c CONTRIBUTORS.txt
141+
displayName: 'Making sure that CONTRIBUTORS.txt remains sorted'

0 commit comments

Comments
 (0)