|
| 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 | + 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