Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d27b53

Browse files
committed
Backport PR #15462: Simplify azure setup.
1 parent 1ef5768 commit 2d27b53

2 files changed

Lines changed: 103 additions & 147 deletions

File tree

azure-pipelines.yml

Lines changed: 103 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,106 @@
33
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
44
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
55

6-
jobs:
7-
8-
- job: 'Linux_Test'
9-
pool:
10-
vmImage: ubuntu-16.04
11-
strategy:
12-
matrix:
13-
Python36:
14-
python.version: '3.6'
15-
Python37:
16-
python.version: '3.7'
17-
maxParallel: 4
18-
19-
steps:
20-
- template: ci/azure-pipelines-steps.yml
21-
parameters:
22-
platform: ubuntu
23-
installer: apt
24-
25-
- job: 'Windows_Test'
26-
pool:
27-
vmImage: vs2017-win2016
28-
strategy:
29-
matrix:
30-
Python36:
31-
python.version: '3.6'
32-
Python37:
33-
python.version: '3.7'
34-
PythonPreview:
35-
python.version: 'Pre'
36-
maxParallel: 4
37-
38-
steps:
39-
- template: ci/azure-pipelines-steps.yml
40-
parameters:
41-
platform: windows
42-
installer: nuget
43-
44-
- job: 'macOS_Test'
45-
pool:
46-
vmImage: xcode9-macos10.13
47-
strategy:
48-
matrix:
49-
Python36:
50-
python.version: '3.6'
51-
Python37:
52-
python.version: '3.7'
53-
maxParallel: 4
54-
55-
steps:
56-
- template: ci/azure-pipelines-steps.yml
57-
parameters:
58-
platform: macos
59-
installer: brew
6+
strategy:
7+
matrix:
8+
Linux_py36:
9+
vmImage: 'ubuntu-16.04'
10+
python.version: '3.6'
11+
Linux_py37:
12+
vmImage: 'ubuntu-16.04'
13+
python.version: '3.7'
14+
macOS_py36:
15+
vmImage: 'xcode9-macOS10.13'
16+
python.version: '3.6'
17+
macOS_py37:
18+
vmImage: 'xcode9-macOS10.13'
19+
python.version: '3.7'
20+
Windows_py36:
21+
vmImage: 'vs2017-win2016'
22+
python.version: '3.6'
23+
Windows_py37:
24+
vmImage: 'vs2017-win2016'
25+
python.version: '3.7'
26+
Windows_pyPre:
27+
vmImage: 'vs2017-win2016'
28+
python.version: 'Pre'
29+
maxParallel: 4
30+
31+
pool:
32+
vmImage: '$(vmImage)'
33+
34+
steps:
35+
36+
- task: UsePythonVersion@0
37+
inputs:
38+
versionSpec: '$(python.version)'
39+
architecture: 'x64'
40+
displayName: 'Use Python $(python.version)'
41+
condition: and(succeeded(), ne(variables['python.version'], 'Pre'))
42+
43+
- task: stevedower.python.InstallPython.InstallPython@1
44+
displayName: 'Use prerelease Python'
45+
inputs:
46+
prerelease: true
47+
condition: and(succeeded(), eq(variables['python.version'], 'Pre'))
48+
49+
- bash: |
50+
case "$(python -c 'import sys; print(sys.platform)')" in
51+
linux)
52+
sudo apt-get update
53+
sudo apt-get install \
54+
cm-super \
55+
dvipng \
56+
ffmpeg \
57+
gdb \
58+
gir1.2-gtk-3.0 \
59+
graphviz \
60+
inkscape \
61+
libcairo2 \
62+
libgeos-dev \
63+
libgirepository-1.0.1 \
64+
lmodern \
65+
otf-freefont \
66+
pgf \
67+
texlive-fonts-recommended \
68+
texlive-latex-base \
69+
texlive-latex-extra \
70+
texlive-latex-recommended \
71+
texlive-xetex texlive-luatex
72+
;;
73+
darwin)
74+
brew cask install xquartz
75+
brew install pkg-config ffmpeg imagemagick mplayer ccache
76+
;;
77+
win32)
78+
;;
79+
*)
80+
exit 1
81+
;;
82+
esac
83+
displayName: 'Install dependencies'
84+
85+
- bash: |
86+
python -m pip install --upgrade pip
87+
python -m pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt ||
88+
[[ "$PYTHON_VERSION" = 'Pre' ]]
89+
displayName: 'Install dependencies with pip'
90+
91+
- bash: |
92+
python -m pip install -ve . ||
93+
[[ "$PYTHON_VERSION" = 'Pre' ]]
94+
displayName: "Install self"
95+
96+
- script: env
97+
displayName: 'print env'
98+
99+
- bash: |
100+
PYTHONFAULTHANDLER=1 python -m pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 ||
101+
[[ "$PYTHON_VERSION" = 'Pre' ]]
102+
displayName: 'pytest'
103+
104+
- task: PublishTestResults@2
105+
inputs:
106+
testResultsFiles: '**/test-results.xml'
107+
testRunTitle: 'Python $(python.version)'
108+
condition: succeededOrFailed()

ci/azure-pipelines-steps.yml

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)