forked from matplotlib/matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
121 lines (113 loc) · 5.35 KB
/
.travis.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
env:
global:
- ARTIFACTS_AWS_REGION=us-east-1
- ARTIFACTS_S3_BUCKET=matplotlib-test-results
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
- BUILD_DOCS=false
- TEST_ARGS=--no-pep8
- NUMPY=numpy
language: python
matrix:
include:
- python: 2.6
env: NUMPY=numpy==1.6
- python: 2.7
- python: 3.3
- python: 3.4
- python: 2.7
env: TEST_ARGS=--pep8
- python: 2.7
env: BUILD_DOCS=true
install:
- pip install -q --use-mirrors nose python-dateutil $NUMPY pep8 pyparsing pillow sphinx!=1.3.0
- sudo apt-get update && sudo apt-get -qq install inkscape libav-tools gdb mencoder
# We use --no-install-recommends to avoid pulling in additional large latex docs that we don't need
# We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not
# availible in the Ubuntu version used by Travis but we can manually install the deb from a later
# version since is it basically just a .ttf file
# We install ipython to use the console highlighting. From IPython 3 this depends on jsonschema and misture.
# Neihter is installed as a dependency of IPython since they are not used by the IPython console.
- |
if [[ $BUILD_DOCS == true ]]; then
sudo apt-get install -qq --no-install-recommends dvipng texlive-latex-base texlive-latex-extra texlive-fonts-recommended graphviz
pip install numpydoc linkchecker ipython jsonschema mistune
wget http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-humor-sans/fonts-humor-sans_1.0-1_all.deb
sudo dpkg -i fonts-humor-sans_1.0-1_all.deb
wget https://googlefontdirectory.googlecode.com/hg/ofl/felipa/Felipa-Regular.ttf
sudo cp Felipa-Regular.ttf /usr/local/share/fonts/
fc-cache -f -v
fi;
- python setup.py install
script:
# The number of processes is hardcoded, because using too many causes the
# Travis VM to run out of memory (since so many copies of inkscape and
# ghostscript are running at the same time).
- echo Testing using 8 processes
# Generate the font caches in a single process before starting the
# multiple processes
- gcc --version
- python -c "from matplotlib import font_manager"
- |
if [[ $BUILD_DOCS == false ]]; then
export MPL_REPO_DIR=$PWD # needed for pep8-conformance test of the examples
mkdir ../tmp_test_dir
cd ../tmp_test_dir
gdb -return-child-result -batch -ex r -ex bt --args python ../matplotlib/tests.py -sv --processes=8 --process-timeout=300 $TEST_ARGS
else
cd doc
python make.py html --small --warningsaserrors
# We don't build the LaTeX docs here, so linkchecker will complain
touch build/html/Matplotlib.pdf
linkchecker build/html/index.html
fi
after_failure:
|
if [[ $BUILD_DOCS == false && $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then
gem install travis-artifacts
cd $TRAVIS_BUILD_DIR/../tmp_test_dir
tar cjf result_images.tar.bz2 result_images
travis-artifacts upload --path result_images.tar.bz2
echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." else echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2
fi
after_success:
|
if [[ $TRAVIS_PULL_REQUEST == false && $BUILD_DOCS == true && $TRAVIS_BRANCH == 'master' ]]; then
cd $TRAVIS_BUILD_DIR
echo "Uploading documentation"
openssl aes-256-cbc -K $encrypted_cc802e084cd0_key -iv $encrypted_cc802e084cd0_iv -in .travis/matplotlibDeployKey.enc -out .travis/matplotlibDeployKey -d
eval `ssh-agent -s`
chmod 600 .travis/matplotlibDeployKey
ssh-add .travis/matplotlibDeployKey
cd ..
git clone [email protected]:matplotlib/devdocs.git
cd devdocs
git checkout --orphan gh-pages
git reset --hard first_commit
cp -R ../matplotlib/doc/build/html/. .
touch .nojekyll
git config --global user.email "MatplotlibTravisBot@nomail"
git config --global user.name "MatplotlibTravisBot"
git config --global push.default simple
git add .
git commit -m "Docs build of $TRAVIS_COMMIT"
git push --set-upstream origin gh-pages --force
else
echo "Will only deploy docs build from matplotlib master branch"
fi
if [[ $TRAVIS_PULL_REQUEST == false ]] && \
[[ $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]] && \
[[ $TRAVIS_BRANCH == 'master' ]]; then
cd $TRAVIS_BUILD_DIR
python .travis/travis_after_all.py
export $(cat .to_export_back)
if [ "$BUILD_LEADER" = "YES" ]; then
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
echo "All Succeeded! Triggering OSX build..."
./.travis/build_children.sh
else
echo "Some Failed; no OSX build"
fi
fi
fi