forked from sphinx-gallery/sphinx-gallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
149 lines (142 loc) · 5.02 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
trigger:
batch: False
branches:
include:
- '*'
pr:
branches:
include:
- '*'
stages:
- stage: Check
jobs:
- job: Skip
pool:
vmImage: 'ubuntu-latest'
variables:
RET: 'true'
steps:
- bash: |
git_log=`git log --max-count=1 --skip=1 --pretty=format:"%s"`
echo "##vso[task.setvariable variable=log]$git_log"
- bash: echo "##vso[task.setvariable variable=RET]false"
condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))
- bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET"
name: result
- stage: Main
condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true'))
dependsOn: Check
variables:
AZURE_CI: 'true'
jobs:
- job:
displayName: Windows
pool:
vmImage: 'windows-latest'
strategy:
matrix:
Python39:
PYTHON_VERSION: '3.10'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
architecture: 'x64'
addToPath: true
- bash: |
set -eo pipefail
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
displayName: Install OpenGL
- bash: |
set -eo pipefail
python --version
python -m pip install --user --upgrade pip setuptools wheel
pip install --user --upgrade --progress-bar off "ipython!=8.7.0" numpy seaborn statsmodels matplotlib sphinx pillow pytest pytest-cov joblib "plotly>=4.0"
pip install --user --upgrade --progress-bar off --pre pydata-sphinx-theme
echo "Qt, plotly, VTK"
pip install --user --upgrade --progress-bar off pyvista "pyqt5!=5.15.8" plotly vtk jupyterlite-sphinx
displayName: Setup pip environment
- script: pip list
displayName: pip list
- script: python -c "import pyvista; print(pyvista.Report())"
displayName: Test 3D
- script: python setup.py develop --user
displayName: Install sphinx-gallery
- script: pytest --tb=short sphinx_gallery
displayName: pytest
- bash: |
set -eo pipefail
sed -i '/show_memory/d' doc/conf.py
sed -i '/compress_images/d' doc/conf.py
displayName: Remove keys incompatible with this Windows build
- bash: make -C doc html
displayName: make html
- bash: bash <(curl -s https://codecov.io/bash)
displayName: 'Codecov'
condition: succeededOrFailed()
- task: PublishTestResults@2
inputs:
testResultsFiles: 'junit-*.xml'
testRunTitle: 'Publish test results for $(Agent.JobName) $(TEST_MODE) $(PYTHON_VERSION)'
failTaskOnFailedTests: true
condition: succeededOrFailed()
- job:
displayName: Linux
pool:
vmImage: 'ubuntu-22.04'
variables:
DISPLAY: ':99'
strategy:
matrix:
ubuntu_python310:
DISTRIB: 'ubuntu'
PYTHON_VERSION: '3.10'
LOCALE: 'C'
conda_python310_sphinxOld:
DISTRIB: 'conda'
PYTHON_VERSION: '3.10'
SPHINX_VERSION: 'old'
conda_python310_sphinxDev:
DISTRIB: 'conda'
PYTHON_VERSION: '3.10'
SPHINX_VERSION: 'dev'
python38_minimal:
DISTRIB: 'minimal'
PYTHON_VERSION: '3.8'
pythonNightly:
DISTRIB: 'nightly'
PYTHON_VERSION: '3.10'
steps:
- task: UsePythonVersion@0
displayName: Specify Python version for minimal and ubuntu
inputs:
versionSpec: $(PYTHON_VERSION)
condition: or(eq(variables['DISTRIB'], 'minimal'), eq(variables['DISTRIB'], 'ubuntu'))
# Make sure that things work even if the locale is set to C (which
# effectively means ASCII). Some of the input rst files have unicode
# characters and we need to deal with this gracefully.
- bash: |
export LC_CTYPE=C
export LC_ALL=C
export LANG=C
displayName: Set locale
condition: eq(variables['LOCALE'], 'C')
- bash: |
sudo add-apt-repository ppa:deadsnakes/ppa
condition: eq(variables['DISTRIB'], 'nightly')
displayName: Add deadsnakes PPA
- bash: |
sudo apt-get update
sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 optipng xvfb
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render -noreset;
displayName: Install Ubuntu dependencies and start Xvfb
- bash: |
./continuous_integration/azure/install.sh
displayName: Run install.sh
- bash: |
./continuous_integration/azure/test_script.sh
displayName: Run test_script.sh
- bash: bash <(curl -s https://codecov.io/bash)
displayName: 'Codecov'
condition: succeededOrFailed()