/
config.yml
86 lines (75 loc) · 2.62 KB
/
config.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
version: 2
jobs:
build_docs:
docker:
- image: circleci/python:3.6-stretch
steps:
# Get our data and merge with upstream
- run: sudo apt-get update
- run: sudo apt-get --no-install-recommends install -y texlive texlive-latex-extra latexmk
- checkout
- run: echo $(git log -1 --pretty=%B) | tee gitlog.txt
- run: echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
- run:
command: |
if [[ $(cat merge.txt) != "" ]]; then
echo "Merging $(cat merge.txt)";
git pull --ff-only origin "refs/pull/$(cat merge.txt)/merge";
fi
# Python env
- run: echo "export PATH=~/.local/bin:$PATH" >> $BASH_ENV
- run: echo "export DISPLAY=:99" >> $BASH_ENV
- run: /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;
- restore_cache:
keys:
- cache-pip
- run: pip install --user numpy scipy matplotlib seaborn sphinx_rtd_theme pillow sphinx pytest vtk traits traitsui pyface pyqt5
- run: pip install --user mayavi
- save_cache:
key: cache-pip
paths:
- ~/.cache/pip
- run: python -c "from mayavi import mlab; import matplotlib.pyplot as plt; mlab.figure(); plt.figure()"
- run: python setup.py develop --user
- run: python setup.py build_sphinx
- store_artifacts:
path: doc/_build/html/
destination: html
- run: SPHX_GLR_THEME=rtd sphinx-build doc rtd_html
- store_artifacts:
path: rtd_html
destination: rtd_html
- run: SPHX_GLR_THEME=alabaster sphinx-build doc alabaster_html
- store_artifacts:
path: alabaster_html
destination: alabaster_html
- run: sphinx-build sphinx_gallery/tests/tinybuild/ tiny_html
- store_artifacts:
path: tiny_html
destination: tiny_html
- run: cd sphinx_gallery/tests/tinybuild/ && make latexpdf
- store_artifacts:
path: sphinx_gallery/tests/tinybuild/_build/latex/
destination: latex
- persist_to_workspace:
root: rtd_html
paths: .
deploy_docs:
docker:
- image: circleci/python:3.6-stretch
steps:
- checkout
- attach_workspace:
at: rtd_html
- run: ./docs_deploy.sh rtd_html
workflows:
version: 2
default:
jobs:
- build_docs
- deploy_docs:
requires:
- build_docs
filters:
branches:
only: master