|
| 1 | +# Circle CI configuration file |
| 2 | +# https://circleci.com/docs/ |
| 3 | + |
| 4 | +machine: |
| 5 | + post: |
| 6 | + - if [ $CIRCLE_NODE_INDEX == "0" ] ; then pyenv global 3.5.3 ; fi |
| 7 | + - if [ $CIRCLE_NODE_INDEX == "1" ] ; then pyenv global 2.7.12 ; fi |
| 8 | + - pyenv version |
| 9 | + |
| 10 | +dependencies: |
| 11 | + cache_directories: |
| 12 | + - ~/.cache/pip |
| 13 | + - ~/.local/share/fonts |
| 14 | + pre: |
| 15 | + - sudo apt-get update |
| 16 | + override: |
| 17 | + # Virtualenv breaks pyenv, so just delete it. |
| 18 | + - rm -rf ~/virtualenvs/venv-system |
| 19 | + - pyenv rehash |
| 20 | + - | |
| 21 | + sudo apt-get install \ |
| 22 | + inkscape \ |
| 23 | + libav-tools \ |
| 24 | + mencoder \ |
| 25 | + dvipng \ |
| 26 | + pgf \ |
| 27 | + lmodern \ |
| 28 | + cm-super \ |
| 29 | + texlive-latex-base \ |
| 30 | + texlive-latex-extra \ |
| 31 | + texlive-fonts-recommended \ |
| 32 | + texlive-latex-recommended \ |
| 33 | + texlive-xetex \ |
| 34 | + graphviz \ |
| 35 | + libgeos-dev \ |
| 36 | + otf-freefont |
| 37 | + # We manually install Humor-Sans using the package from Ubuntu 14.10. |
| 38 | + # Unfortunately humor sans is not available in the Ubuntu version used by |
| 39 | + # CircleCI but we can manually install the deb from a later version since |
| 40 | + # it is basically just a .ttf file. |
| 41 | + - mkdir -p ~/.local/share/fonts |
| 42 | + - wget -nc https://github.com/google/fonts/blob/master/ofl/felipa/Felipa-Regular.ttf?raw=true -O ~/.local/share/fonts/Felipa-Regular.ttf || true |
| 43 | + - | |
| 44 | + if [ ! -f ~/.local/share/fonts/Humor-Sans.ttf ]; then |
| 45 | + wget https://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb |
| 46 | + mkdir tmp |
| 47 | + dpkg -x fonts-humor-sans_1.0-1_all.deb tmp |
| 48 | + cp tmp/usr/share/fonts/truetype/humor-sans/Humor-Sans.ttf ~/.local/share/fonts |
| 49 | + rm -rf tmp |
| 50 | + else |
| 51 | + echo "Not downloading Humor-Sans; file already exists." |
| 52 | + fi |
| 53 | + - fc-cache -f -v |
| 54 | + |
| 55 | + # Upgrade pip and setuptools and wheel to get as clean an install as possible |
| 56 | + - pip install --upgrade pip |
| 57 | + - pip install --upgrade wheel |
| 58 | + - pip install --upgrade setuptools |
| 59 | + |
| 60 | + # Install dependencies from pypi |
| 61 | + - | |
| 62 | + if [ $CIRCLE_NODE_INDEX == "1" ]; then NUMPY_VERSION="==1.7.1"; fi |
| 63 | + pip install python-dateutil numpy${NUMPY_VERSION} pyparsing!=2.1.6 cycler codecov coverage sphinx pillow |
| 64 | + - pip install -r doc-requirements.txt |
| 65 | + # Linkchecker only works with python 2.7 for the time being. |
| 66 | + # Linkchecker is currently broken with requests 2.10.0 so force an earlier version. |
| 67 | + - if [ $CIRCLE_NODE_INDEX == "1" ]; then pip install $PRE requests==2.9.2 linkchecker; fi |
| 68 | + |
| 69 | +compile: |
| 70 | + override: |
| 71 | + # Install matplotlib |
| 72 | + - pip install -ve . |
| 73 | + |
| 74 | +test: |
| 75 | + # Note: test block doesn't run in parallel by default, so we need to enable |
| 76 | + # it manually with this extra metadata. |
| 77 | + override: |
| 78 | + - python make.py html: |
| 79 | + parallel: true |
| 80 | + pwd: doc |
| 81 | + # We don't build the LaTeX docs here, so linkchecker will complain |
| 82 | + - touch doc/build/html/Matplotlib.pdf: |
| 83 | + parallel: true |
| 84 | + # Linkchecker only works with python 2.7 for the time being |
| 85 | + - if [ $CIRCLE_NODE_INDEX == "1" ]; then linkchecker build/html/index.html; fi: |
| 86 | + parallel: true |
| 87 | + pwd: doc |
| 88 | + - echo "Built documentation is available at ${CIRCLE_BUILD_URL}/artifacts/0/${HOME}/${CIRCLE_PROJECT_REPONAME}/doc/build/html/index.html" |
| 89 | + |
| 90 | +general: |
| 91 | + artifacts: |
| 92 | + - doc/build/html/ |
| 93 | + |
| 94 | +deployment: |
| 95 | + development: |
| 96 | + branch: master |
| 97 | + commands: |
| 98 | + - git clone git@github.com:matplotlib/devdocs.git |
| 99 | + - git checkout --orphan gh-pages || true: |
| 100 | + pwd: devdocs |
| 101 | + - git reset --hard first_commit: |
| 102 | + pwd: devdocs |
| 103 | + - cp -R doc/build/html/. devdocs/ |
| 104 | + - touch devdocs/.nojekyll |
| 105 | + - git config --global user.email "MatplotlibCircleBot@nomail": |
| 106 | + pwd: devdocs |
| 107 | + - git config --global user.name "MatplotlibCircleBot": |
| 108 | + pwd: devdocs |
| 109 | + - git config --global push.default simple: |
| 110 | + pwd: devdocs |
| 111 | + - git add .: |
| 112 | + pwd: devdocs |
| 113 | + - git commit -m "Docs build of $CIRCLE_SHA1": |
| 114 | + pwd: devdocs |
| 115 | + - git push --set-upstream origin gh-pages --force: |
| 116 | + pwd: devdocs |
0 commit comments