Skip to content

Simplify travis setup a bit. #11056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ install:
- del %LIBRARY_LIB%\z.lib
- set MPLBASEDIRLIST=%CONDA_PREFIX%\Library\;.
# enables the local freetype build
- copy ci\travis\setup.cfg .
- set MPLLOCALFREETYPE=1
# Show the installed packages + versions
- conda list

Expand Down
100 changes: 52 additions & 48 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@ env:
- PYTEST_COV=pytest-cov
- PYTEST_PEP8=
- SPHINX=sphinx
# Variables controlling the build.
- MPLLOCALFREETYPE=1
# Variables controlling the test run.
- DELETE_FONT_CACHE=
- NO_AT_BRIDGE=1 # Necessary for GTK3 interactive test.
# 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).
- NPROC=2
- OPENBLAS_NUM_THREADS=1
- PYTHONFAULTHANDLER=1
- PYTEST_ARGS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
- PYTHON_ARGS=
- PYTEST_ADDOPTS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
- RUN_PEP8=

matrix:
Expand All @@ -84,9 +88,14 @@ matrix:
- PYTEST_COV=pytest-cov==2.3.1
- SPHINX=sphinx==1.3
- python: 3.5
env: PYTHON_ARGS=-OO
env:
# - PYTHONOPTIMIZE=2 # This currently doesn't work.
- python: 3.6
env: DELETE_FONT_CACHE=1 PANDAS='pandas<0.21.0' PYTEST_PEP8=pytest-pep8 RUN_PEP8=--pep8
env:
- DELETE_FONT_CACHE=1
- PANDAS='pandas<0.21.0'
- PYTEST_PEP8=pytest-pep8
- PYTEST_ADDOPTS="$PYTEST_ADDOPTS --pep8"
- python: "nightly"
env: PRE=--pre
- os: osx
Expand All @@ -104,25 +113,22 @@ matrix:
allow_failures:
- python: "nightly"

before_install:
- |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
# test with non-ascii in path
mkdir /tmp/λ
export PATH=$PATH:/tmp/λ
export PATH=/usr/lib/ccache:$PATH
else
ci/travis/silence brew update
brew upgrade python
brew install ffmpeg imagemagick mplayer ccache
hash -r
which python
python --version
# We could install ghostscript and inkscape here to test svg and pdf
# but this makes the test time really long.
# brew install ghostscript inkscape
export PATH=/usr/local/opt/python/libexec/bin:/usr/local/opt/ccache/libexec:$PATH
fi
before_install: |
# test with non-ascii in path
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
export PATH=/usr/lib/ccache:$PATH
else
ci/silence brew update
brew upgrade python
brew install ffmpeg imagemagick mplayer ccache
hash -r
which python
python --version
# We could install ghostscript and inkscape here to test svg and pdf
# but this makes the test time really long.
# brew install ghostscript inkscape
export PATH=/usr/local/opt/python/libexec/bin:/usr/local/opt/ccache/libexec:$PATH
fi

install:
- |
Expand All @@ -141,8 +147,6 @@ install:
$NOSE \
$NUMPY \
$PANDAS \
codecov \
coverage \
pillow \
$PYPARSING \
$SPHINX \
Expand Down Expand Up @@ -175,34 +179,34 @@ install:
pytest-rerunfailures \
pytest-timeout \
pytest-xdist

# Use the special local version of freetype for testing
cp ci/travis/setup.cfg .
- |
# Install matplotlib
python -mpip install -ve .

before_script:
- |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
fi
before_script: |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
fi
if [[ $DELETE_FONT_CACHE == 1 ]]; then
rm -rf ~/.cache/matplotlib
fi

script: ci/travis/test_script.sh
script: |
echo "Calling pytest with the following arguments: $PYTEST_ADDOPTS"
python -mpytest

before_cache:
- rm -rf $HOME/.cache/matplotlib/tex.cache
- rm -rf $HOME/.cache/matplotlib/test_cache
before_cache: |
rm -rf $HOME/.cache/matplotlib/tex.cache
rm -rf $HOME/.cache/matplotlib/test_cache

after_failure:
- |
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then
tar cjf result_images.tar.bz2 result_images
echo 'See "Uploading Artifacts" near the end of the log for the download URL'
else
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."
fi
after_failure: |
if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then
tar cjf result_images.tar.bz2 result_images
echo 'See "Uploading Artifacts" near the end of the log for the download URL'
else
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."
fi

after_success:
- codecov -e TRAVIS_PYTHON_VERSION
after_success: |
codecov -e TRAVIS_PYTHON_VERSION
File renamed without changes.
Binary file removed ci/travis/matplotlibDeployKey.enc
Binary file not shown.
2 changes: 0 additions & 2 deletions ci/travis/setup.cfg

This file was deleted.

20 changes: 0 additions & 20 deletions ci/travis/test_script.sh

This file was deleted.