8000 Simplify azure setup. · matplotlib/matplotlib@635e7a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 635e7a9

Browse files
committed
Simplify azure setup.
One can keep everything in a single file by dispatching based on the OS, rather than splitting the build over two different files.
1 parent 330a054 commit 635e7a9

File tree

2 files changed

+104
-127
lines changed

2 files changed

+104
-127
lines changed

azure-pipelines.yml

Lines changed: 104 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,107 @@
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-add-repository ppa:jonathonf/ffmpeg-3
53+
sudo apt-get update
54+
sudo apt-get install \
55+
cm-super \
56+
dvipng \
57+
ffmpeg \
58+
gdb \
59+
gir1.2-gtk-3.0 \
60+
graphviz \
61+
inkscape \
62+
libcairo2 \
63+
libgeos-dev \
64+
libgirepository-1.0.1 \
65+
lmodern \
66+
otf-freefont \
67+
pgf \
68+
texlive-fonts-recommended \
69+
texlive-latex-base \
70+
texlive-latex-extra \
71+
texlive-latex-recommended \
72+
texlive-xetex texlive-luatex
73+
;;
74+
darwin)
75+
brew cask install xquartz
76+
brew install pkg-config ffmpeg imagemagick mplayer ccache
77+
;;
78+
win32)
79+
;;
80+
*)
81+
exit 1
82+
;;
83+
esac
84+
displayName: 'Install dependencies'
85+
86+
- bash: |
87+
python -m pip install --upgrade pip
88+
python -m pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt ||
89+
[[ "$PYTHON_VERSION" = 'Pre' ]]
90+
displayName: 'Install dependencies with pip'
91+
92+
- bash: |
93+
python -m pip install -ve . ||
94+
[[ "$PYTHON_VERSION" = 'Pre' ]]
95+
displayName: "Install self"
96+
97+
- script: env
98+
displayName: 'print env'
99+
100+
- bash: |
101+
PYTHONFAULTHANDLER=1 python -m pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 ||
102+
[[ "$PYTHON_VERSION" = 'Pre' ]]
103+
displayName: 'pytest'
104+
105+
- task: PublishTestResults@2
106+
inputs:
107+
testResultsFiles: '**/test-results.xml'
108+
testRunTitle: 'Python $(python.version)'
109+
condition: succeededOrFailed()

ci/azure-pipelines-steps.yml

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

0 commit comments

Comments
 (0)
0