Skip to content

Commit

Permalink
Backport azure (#4159)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Oct 9, 2019
1 parent 53f0eeb commit 388c65b
Show file tree
Hide file tree
Showing 15 changed files with 601 additions and 166 deletions.
16 changes: 8 additions & 8 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ test_script:
after_test:
- "tools/build.cmd %PYTHON%\\python.exe -m codecov -f coverage.xml -X gcov"

artifacts:
- path: dist\*

deploy_script:
- ps: >-
if($env:appveyor_repo_tag -eq 'True') {
Invoke-Expression "$env:PYTHON\\python.exe -m twine upload dist/* --username $env:PYPI_USER --password $env:PYPI_PASSWD --skip-existing"
}
# artifacts:
# - path: dist\*

# deploy_script:
# - ps: >-
# if($env:appveyor_repo_tag -eq 'True') {
# Invoke-Expression "$env:PYTHON\\python.exe -m twine upload dist/* --username $env:PYPI_USER --password $env:PYPI_PASSWD --skip-existing"
# }

#notifications:
# - provider: Webhook
Expand Down
22 changes: 22 additions & 0 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
trigger:
batch: true
branches:
include:
- master
- ?.?* # matches to backport branches, e.g. 3.6
exclude:
- refs/tags/*
pr:
autoCancel: true
branches:
include:
- master

variables:
- group: codecov

stages:
- template: stage-lint.yml
- template: stage-test.yml
parameters:
codecov.token: '$(codecov.token)'
148 changes: 148 additions & 0 deletions .azure-pipelines/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
trigger:
branches:
include:
- refs/tags/*
pr: none


variables:
- group: codecov
- group: twine


resources:
containers:
- container: manylinux
image: quay.io/pypa/manylinux1_x86_64
repositories:
- repository: templates
type: github
name: aio-libs/azure-pipelines
endpoint: aio-libs

stages:
- template: stage-lint.yml

- template: stage-test.yml
parameters:
codecov.token: '$(codecov.token)'

- stage: build
displayName: 'Build'

jobs:
- job: tarball
displayName: 'Tarball'
pool:
vmImage: 'ubuntu-latest'

steps:
- template: templates/step-build.yml@templates
parameters:
steps:
- script: |
make cythonize
displayName: 'Cythonize'
- script: |
python setup.py sdist
displayName: 'Make tarball'
- job: manylinux
displayName: 'Manylinux'
strategy:
matrix:
py35 x64:
python.code: 'cp35-cp35m'
manylinux: 'manylinux_64'
py36 x64:
python.code: 'cp36-cp36m'
manylinux: 'manylinux_64'
py37 x64:
python.code: 'cp37-cp37m'
manylinux: 'manylinux_64'
pool:
vmImage: 'ubuntu-latest'
container: manylinux
steps:
- checkout: self
submodules: true
clean: true

- script: |
/opt/python/$(python.code)/bin/python -m venv .build-venv
displayName: 'Use Python $(python.code)'
- script: |
source .build-venv/bin/activate
pip install -U setuptools wheel
displayName: 'Install tools'
- script: |
source .build-venv/bin/activate
make cythonize
python setup.py bdist_wheel
displayName: 'Make wheel'
- script: |
auditwheel repair dist/*.whl --wheel-dir wheelhouse/
displayName: 'Repair wheel'
- template: templates/step-store-dist.yml@templates
parameters:
folder: wheelhouse

- job:
strategy:
matrix:
Win py35 x64:
python.version: '3.5'
python.architecture: 'x64'
image: 'windows-latest'
Win py36 x64:
python.version: '3.6'
python.architecture: 'x64'
image: 'windows-latest'
Win py37 x64:
python.version: '3.7'
python.architecture: 'x64'
image: 'windows-latest'
Win py35 x86:
python.version: '3.5'
python.architecture: 'x86'
image: 'windows-latest'
Win py36 x86:
python.version: '3.6'
python.architecture: 'x86'
image: 'windows-latest'
Win py37 x86:
python.version: '3.7'
python.architecture: 'x86'
image: 'windows-latest'
Mac py35:
python.version: '3.5'
image: 'macos-latest'
python.architecture: 'x64'
Mac py36:
python.version: '3.6'
image: 'macos-latest'
python.architecture: 'x64'
Mac py37:
python.version: '3.7'
image: 'macos-latest'
python.architecture: 'x64'
pool:
vmImage: '$(image)'
steps:
- template: templates/step-build.yml@templates
parameters:
python: '$(python.version)'
architecture: '$(python.architecture)'
steps:
- script: |
make cythonize
python setup.py bdist_wheel
displayName: 'Make wheel'
- template: templates/stage-publish.yml@templates
parameters:
github: release-upload
141 changes: 141 additions & 0 deletions .azure-pipelines/stage-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
stages:
- stage: lint
displayName: 'Run linters'

jobs:
- job: 'flake8'
pool:
vmImage: 'ubuntu-latest'

steps:
- checkout: self
submodules: true
clean: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- script: |
pip install -r requirements/lint.txt
displayName: 'Install deps'
- script: |
make flake8
displayName: 'Run flake8'
- job: 'isort'
pool:
vmImage: 'ubuntu-latest'

steps:
- checkout: self
submodules: true
clean: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- script: |
pip install -e .
displayName: 'Install itself'
env:
AIOHTTP_NO_EXTENSIONS: 1
- script: |
pip install -r requirements/lint.txt
displayName: 'Install deps'
- script: |
make isort-check
displayName: 'Run isort checker'
- job: 'mypy'
pool:
vmImage: 'ubuntu-latest'

steps:
- checkout: self
submodules: true
clean: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- script: |
pip install -r requirements/lint.txt
displayName: 'Install deps'
- script: |
pip install -e .
displayName: 'Install itself'
env:
AIOHTTP_NO_EXTENSIONS: 1
- script: |
make mypy
displayName: 'Run black checker'
- job: 'docs'
pool:
vmImage: 'ubuntu-latest'

steps:
- checkout: self
submodules: true
clean: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- script: |
apt install libenchant-dev
pip install -r requirements/doc-spelling.txt
displayName: 'Install deps'
- script: |
make doc
displayName: 'Run docs checker'
env:
AIOHTTP_NO_EXTENSIONS: 1
- job: 'twine'
pool:
vmImage: 'ubuntu-latest'

steps:
- checkout: self
submodules: true
clean: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: 'x64'

- script: |
pip install -U twine wheel
python setup.py sdist bdist_wheel
displayName: 'Install deps'
env:
AIOHTTP_NO_EXTENSIONS: 1
- script: |
twine check dist/*
displayName: 'Run twine checker'
- job: 'contributors'
pool:
vmImage: 'ubuntu-latest'

steps:
- script: |
LC_ALL=C sort -c CONTRIBUTORS.txt
displayName: 'Making sure that CONTRIBUTORS.txt remains sorted'
Loading

0 comments on commit 388c65b

Please sign in to comment.