8000 Merge pull request #6568 from jenshnielsen/travisosx · matplotlib/matplotlib@21e16c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 21e16c3

Browse files
authored
Merge pull request #6568 from jenshnielsen/travisosx
CI: Add OSX to travis tests
2 parents 404cb71 + 5bc35b1 commit 21e16c3

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

.travis.yml

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cache:
55
- $HOME/.ccache
66
- $HOME/.cache/pip
77
- $HOME/.cache/matplotlib
8+
- $HOME/Library/Caches/pip
89

910
addons:
1011
apt:
@@ -58,16 +59,29 @@ matrix:
5859
env: BUILD_DOCS=true
5960
- python: "nightly"
6061
env: PRE=--pre
62+
- os: osx
63+
osx_image: xcode7.3
64+
language: generic
65+
env: MOCK=mock NOSE_ARGS=
6166
allow_failures:
6267
- python: "nightly"
6368

6469
before_install:
6570
- |
6671
# Install into our own pristine virtualenv
67-
source ci/travis/travis_tools.sh
68-
virtualenv --python=python venv
69-
source venv/bin/activate
70-
export PATH=/usr/lib/ccache:$PATH
72+
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
73+
virtualenv --python=python venv
74+
source venv/bin/activate
75+
export PATH=/usr/lib/ccache:$PATH
76+
else
77+
brew update
78+
brew tap homebrew/gui
79+
brew install python libpng ffmpeg imagemagick mplayer ccache
80+
# We could install ghostscript and inkscape here to test svg and pdf
81+
# but this makes the test time really long.
82+
# brew install ghostscript inkscape
83+
export PATH=/usr/local/opt/ccache/libexec:$PATH
84+
fi
7185
7286
install:
7387
- |
@@ -123,7 +137,11 @@ script:
123137
echo The following args are passed to nose $NOSE_ARGS
124138
if [[ $BUILD_DOCS == false ]]; then
125139
export MPL_REPO_DIR=$PWD # needed for pep8-conformance test of the examples
126-
gdb -return-child-result -batch -ex r -ex bt --args python tests.py $NOSE_ARGS $TEST_ARGS
140+
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
141+
python tests.py $NOSE_ARGS $TEST_ARGS
142+
else
143+
gdb -return-child-result -batch -ex r -ex bt --args python tests.py $NOSE_ARGS $TEST_ARGS
144+
fi
127145
else
128146
cd doc
129147
python make.py html --small
@@ -177,21 +195,6 @@ after_success:
177195
else
178196
echo "Will only deploy docs build from matplotlib master branch"
179197
fi
180-
if [[ $TRAVIS_PULL_REQUEST == false ]] && \
181-
[[ $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]] && \
182-
[[ $TRAVIS_BRANCH == 'master' ]]; then
183-
cd $TRAVIS_BUILD_DIR
184-
python ci/travis/travis_after_all.py
185-
export $(cat .to_export_back)
186-
if [ "$BUILD_LEADER" = "YES" ]; then
187-
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
188-
echo "All Succeeded! Triggering OSX build..."
189-
./ci/travis/build_children.sh
190-
else
191-
echo "Some Failed; no OSX build"
192-
fi
193-
fi
194-
fi
195198
if [[ $NOSE_ARGS="--with-coverage" ]]; then
196199
coveralls
197200
fi

0 commit comments

Comments
 (0)
0