Skip to content
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

Add PyPy3 build on Travis CI #33

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
42 changes: 37 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,47 @@ matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.4
env: TOXENV=py34
- python: pypy
env: TOXENV=pypy
#- python: 3.4
#env: TOXENV=py34
#- python: 3.5
#env: TOXENV=py35
#- python: 3.6
#env: TOXENV=py36
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
env: TOXENV=pypy3

# command to install dependencies
install:
- |
if [ "$TOXENV" = "pypy" ]; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
# get latest PyPy from pyenv directly (thanks to natural version sort option -V)
export PYPY_VERSION=`"$PYENV_ROOT/bin/pyenv" install --list |grep -o -E 'pypy-[0-9][\.0-9]*$' |sort -V |tail -1`
"$PYENV_ROOT/bin/pyenv" install --skip-existing "$PYPY_VERSION"
virtualenv --python="$PYENV_ROOT/versions/$PYPY_VERSION/bin/python" "$HOME/virtualenvs/$PYPY_VERSION"
source "$HOME/virtualenvs/$PYPY_VERSION/bin/activate"
fi
- |
if [ "$TOXENV" = "pypy3" ]; then
export PYENV_ROOT="$HOME/.pyenv"
if [ -f "$PYENV_ROOT/bin/pyenv" ]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
# get latest PyPy3 from pyenv directly (thanks to natural version sort option -V)
export PYPY3_VERSION=`"$PYENV_ROOT/bin/pyenv" install --list |grep -o -E 'pypy3[\.0-9]*-[0-9][\.0-9]*(-alpha[0-9]*)?$' |sort -V |tail -1`
"$PYENV_ROOT/bin/pyenv" install --skip-existing "$PYPY3_VERSION"
virtualenv --python="$PYENV_ROOT/versions/$PYPY3_VERSION/bin/python" "$HOME/virtualenvs/$PYPY3_VERSION"
source "$HOME/virtualenvs/$PYPY3_VERSION/bin/activate"
fi
- pip install -U tox codecov

# command to run tests, e.g. python setup.py test
Expand Down