Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0ff669f

Browse filesBrowse files
zoobatacaswell
authored andcommitted
CI: set up OSX and windows azure pipelines
Adds macOS and Windows builds to Azure Pipelines Correct VM image name Fix job names and remove extension reference Add dependency installs for macOS and Ubuntu Attempt to use libpng from nuget for Windows build Ensures nuget is available on PATH
1 parent 46186b9 commit 0ff669f
Copy full SHA for 0ff669f

File tree

Expand file treeCollapse file tree

2 files changed

+125
-26
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+125
-26
lines changed

‎azure-pipelines.yml

Copy file name to clipboardExpand all lines: azure-pipelines.yml
+38-26Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
jobs:
77

8-
- job: 'Test'
8+
- job: 'Linux_Test'
99
pool:
10-
vmImage: 'Ubuntu 16.04'
10+
vmImage: ubuntu-16.04
1111
strategy:
1212
matrix:
1313
Python36:
@@ -17,31 +17,43 @@ jobs:
1717
maxParallel: 4
1818

1919
steps:
20-
- task: UsePythonVersion@0
21-
inputs:
22-
versionSpec: '$(python.version)'
23-
architecture: 'x64'
20+
- template: ci/azure-pipelines-steps.yml
21+
parameters:
22+
platform: ubuntu
23+
installer: apt
2424

25-
- script: |
26-
python -m pip install --upgrade pip
27-
pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
28-
displayName: 'Install dependencies'
29-
30-
- script: |
31-
export MPLLOCALFREETYPE=1
32-
pip install -ve .
33-
displayName: "Install self"
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
3437

35-
- script: env
36-
displayName: 'print env'
38+
steps:
39+
- template: ci/azure-pipelines-steps.yml
40+
parameters:
41+
platform: windows
42+
installer: nuget
3743

38-
- script: |
39-
env
40-
PYTHONFAULTHANDLER=1 pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2 --log-level=DEBUG
41-
displayName: 'pytest'
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
4254

43-
- task: PublishTestResults@2
44-
inputs:
45-
testResultsFiles: '**/test-results.xml'
46-
testRunTitle: 'Python $(python.version)'
47-
condition: succeededOrFailed()
55+
steps:
56+
- template: ci/azure-pipelines-steps.yml
57+
parameters:
58+
platform: macos
59+
installer: brew

‎ci/azure-pipelines-steps.yml

Copy file name to clipboard
+87Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
parameters:
2+
platform: none
3+
installer: none
4+
5+
steps:
6+
- task: UsePythonVersion@0
7+
inputs:
8+
versionSpec: '$(python.version)'
9+
architecture: 'x64'
10+
displayName: 'Use Python $(python.version)'
11+
condition: and(succeeded(), ne(variables['python.version'], 'Pre'))
12+
13+
- task: stevedower.python.InstallPython.InstallPython@1
14+
displayName: 'Use prerelease Python'
15+
inputs:
16+
prerelease: true
17+
condition: and(succeeded(), eq(variables['python.version'], 'Pre'))
18+
19+
- ${{ if eq(parameters.installer, 'nuget') }}:
20+
- task: NuGetToolInstaller@0
21+
displayName: 'Use latest available Nuget'
22+
23+
- script: |
24+
nuget install libpng-msvc14-x64 -ExcludeVersion -OutputDirectory "$(build.BinariesDirectory)"
25+
echo ##vso[task.setvariable variable=MPLBASEDIRLIST]win32_static;$(build.BinariesDirectory)\libpng-msvc14-x64\build\native
26+
echo ##vso[task.setvariable variable=LIBDIR]%LIBDIR%;$(build.BinariesDirectory)\libpng-msvc14-x64\build\native\lib_release
27+
echo ##vso[task.prependpath]$(build.BinariesDirectory)\libpng-msvc14-x64\build\native\bin_release
28+
displayName: 'Install dependencies with nuget'
29+
30+
- ${{ if eq(parameters.installer, 'brew') }}:
31+
- script: |
32+
brew install pkg-config ffmpeg imagemagick mplayer ccache
33+
displayName: 'Install dependencies with brew'
34+
35+
- ${{ if eq(parameters.installer, 'apt') }}:
36+
- script: |
37+
sudo apt-add-repository ppa:jonathonf/ffmpeg-3
38+
sudo apt-get update
39+
sudo apt-get install \
40+
cm-super \
41+
dvipng \
42+
ffmpeg \
43+
gdb \
44+
gir1.2-gtk-3.0 \
45+
graphviz \
46+
inkscape \
47+
libcairo2 \
48+
libgeos-dev \
49+
libgirepository-1.0.1 \
50+
lmodern \
51+
otf-freefont \
52+
pgf \
53+
texlive-fonts-recommended \
54+
texlive-latex-base \
55+
texlive-latex-extra \
56+
texlive-latex-recommended \
57+
texlive-xetex texlive-luatex
58+
displayName: 'Install dependencies with apt'
59+
60+
- script: |
61+
62+
python -m pip install --upgrade pip
63+
pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
64+
65+
displayName: 'Install dependencies with pip'
66+
67+
- script: |
68+
69+
pip install -ve .
70+
71+
displayName: "Install self"
72+
env:
73+
MPLLOCALFREETYPE: 1
74+
75+
- script: env
76+
displayName: 'print env'
77+
78+
- script: |
79+
env
80+
PYTHONFAULTHANDLER=1 pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2
81+
displayName: 'pytest'
82+
83+
- task: PublishTestResults@2
84+
inputs:
85+
testResultsFiles: '**/test-results.xml'
86+
testRunTitle: 'Python $(python.version)'
87+
condition: succeededOrFailed()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.