Commit cc436e29 authored by Marius Gedminas's avatar Marius Gedminas

Travis builds: always build manylinux wheels

This also reformats the YAML, for which I apologize, but it was hard to
work on it without doing that.

It drops dist: xenial which has become the default.

It renames matrix: to jobs: because that's the preferres spelling
according to Travis CI docs.

It adds names to all the special build jobs.

It moves regular Linux Python builds outside build matrix, for
conciseness (unfortunately this means 3.6 builds are now done twice:
once without -fwrapv and once with)

It moves docker pull and twine upload out of .manylinux.sh and into
.travis.yml.

It unifies twine upload calls by supplifying username/password via
environment variables.

The changes largely mirror those in
https://github.com/zopefoundation/BTrees/pull/115.
parent 0e066c35
...@@ -2,8 +2,4 @@ ...@@ -2,8 +2,4 @@
set -e -x set -e -x
docker pull $DOCKER_IMAGE docker run --rm -v "$(pwd)":/io $DOCKER_IMAGE $PRE_CMD /io/.manylinux-install.sh
docker run --rm -v `pwd`:/io $DOCKER_IMAGE $PRE_CMD /io/.manylinux-install.sh
pip install twine && twine upload -u zope.wheelbuilder -p $PYPIPASSWORD wheelhouse/*
language: python language: python
dist: xenial
matrix: env:
include: global:
- os: linux - TWINE_USERNAME: zope.wheelbuilder
python: 2.7 # this sets $PYPIPASSWORD
- name: 2.7-pure - secure: "NTWzDr5p8KRPNt+sniTot7csbzC87rzir/XfLtENE0GpQ49FlKw3lBhsDqAPoD8Ea5lwiHXmC/C/ci1UZhFvVEkAoQ2qJlMRnhqUdRJSrqcitmRt0fT6mLaTd+Lr+DxKlBxpssobrEm2G42V/G1s0Ggym04OqF8T+s6MF5ywgJM="
os: linux
python: 2.7 python:
env: PURE_PYTHON=1 - 2.7
- os: linux - 3.5
python: 3.5 - 3.6
- os: linux - 3.7
python: 3.6 - 3.8
# Test for https://github.com/zopefoundation/persistent/issues/86 - pypy
env: CFLAGS="-fno-wrapv" - pypy3
- os: linux
python: pypy jobs:
- os: linux include:
python: pypy3
- os: linux # Special Linux builds
python: 3.7 - name: "Python: 2.7, pure (no C extensions)"
- name: 3.7-pure python: 2.7
os: linux env: PURE_PYTHON=1
python: 3.7
env: PURE_PYTHON=1 # Test for https://github.com/zopefoundation/persistent/issues/86
- os: linux - name: "Python: 3.6, -fno-wrapv"
python: 3.8 python: 3.6
- name: docs env: CFLAGS="-fno-wrapv"
os: linux
python: 3.6 - name: "Python: 3.7, pure (no C extensions)"
install: python: 3.7
- pip install -U -e .[docs] env: PURE_PYTHON=1
script:
- sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html - name: "Documentation"
- sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest python: 3.6
after_success: install:
# It's important to use 'macpython' builds to get the least - pip install -U -e .[docs]
# restrictive wheel tag. It's also important to avoid script:
# 'homebrew 3' because it floats instead of being a specific version. - sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
- os: osx - sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
language: generic after_success:
env: TERRYFY_PYTHON='macpython 2.7'
- os: osx # manylinux wheel builds
language: generic - name: 64-bit manylinux wheels (all Pythons)
env: TERRYFY_PYTHON='macpython 3.5' services: docker
- os: osx env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
language: generic install: docker pull $DOCKER_IMAGE
env: TERRYFY_PYTHON='macpython 3.6.0' script: bash .manylinux.sh
- os: osx
language: generic - name: 32-bit manylinux wheels (all Pythons)
env: TERRYFY_PYTHON='macpython 3.7.0' services: docker
- services: env: DOCKER_IMAGE=quay.io/pypa/manylinux1_i686 PRE_CMD=linux32
- docker install: docker pull $DOCKER_IMAGE
env: DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64 script: bash .manylinux.sh
before_install:
- if [[ $TRAVIS_TAG ]]; then bash .manylinux.sh; fi # It's important to use 'macpython' builds to get the least
- exit 0 # restrictive wheel tag. It's also important to avoid
- services: # 'homebrew 3' because it floats instead of being a specific version.
- docker - name: Python 2.7 wheels for MacOS
env: os: osx
- DOCKER_IMAGE=quay.io/pypa/manylinux1_i686 language: generic
- PRE_CMD=linux32 env: TERRYFY_PYTHON='macpython 2.7'
before_install: - name: Python 3.5 wheels for MacOS
- if [[ $TRAVIS_TAG ]]; then bash .manylinux.sh; fi os: osx
- exit 0 language: generic
env: TERRYFY_PYTHON='macpython 3.5'
- name: Python 3.6 wheels for MacOS
os: osx
language: generic
env: TERRYFY_PYTHON='macpython 3.6.0'
- name: Python 3.7 wheels for MacOS
os: osx
language: generic
env: TERRYFY_PYTHON='macpython 3.7.0'
before_install: before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git clone https://github.com/MacPython/terryfy; fi - |
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/travis_tools.sh; fi if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then get_python_environment $TERRYFY_PYTHON venv; fi git clone https://github.com/MacPython/terryfy
- pip install -U pip setuptools cffi wheel coverage coveralls source terryfy/travis_tools.sh
get_python_environment $TERRYFY_PYTHON venv
fi
install: install:
- pip install -U -e .[test] - pip install -U pip setuptools cffi wheel coverage coveralls
- pip install -U -e .[test]
script: script:
- python --version - python --version
# make sure we can build a wheel
- python setup.py bdist_wheel # make sure we can build a wheel
# coverage makes PyPy run about 3x slower, but the tests only take - python setup.py bdist_wheel
# .4s to begin with (the whole process takes about 1.5), so that's
# still only 4.5s, which is maneagable. # coverage makes PyPy run about 3x slower, but the tests only take
- coverage run -m zope.testrunner --test-path=. --auto-color --auto-progress # .4s to begin with (the whole process takes about 1.5), so that's
notifications: # still only 4.5s, which is maneagable.
email: false - coverage run -m zope.testrunner --test-path=. --auto-color --auto-progress
after_success: after_success:
- coveralls - coveralls
- echo [distutils] > ~/.pypirc - |
- echo index-servers = pypi >> ~/.pypirc if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then
- echo [pypi] >> ~/.pypirc pip install twine
- echo username=zope.wheelbuilder >> ~/.pypirc python setup.py bdist_wheel
- echo password=$PYPIPASSWORD >> ~/.pypirc TWINE_PASSWORD=$PYPIPASSWORD twine upload --skip-existing dist/*
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then pip install twine; fi fi
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then python setup.py bdist_wheel; fi - |
- if [[ $TRAVIS_TAG && "$TRAVIS_OS_NAME" == "osx" ]]; then twine upload dist/*; fi if [[ $TRAVIS_TAG && -n "$DOCKER_IMAGE" ]]; then
pip install twine
TWINE_PASSWORD=$PYPIPASSWORD twine upload --skip-existing wheelhouse/*
fi
env: notifications:
global: email: false
secure: "NTWzDr5p8KRPNt+sniTot7csbzC87rzir/XfLtENE0GpQ49FlKw3lBhsDqAPoD8Ea5lwiHXmC/C/ci1UZhFvVEkAoQ2qJlMRnhqUdRJSrqcitmRt0fT6mLaTd+Lr+DxKlBxpssobrEm2G42V/G1s0Ggym04OqF8T+s6MF5ywgJM="
cache: pip
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment