Skip to content

Commit

Permalink
Publish OS X wheels to PYPI @ Travis CI
Browse files Browse the repository at this point in the history
* Add OS X deploy matrix combination

* Add dpl job labels via hacking env vars

* Simplify pyenv helper

Closes #156
  • Loading branch information
webknjaz committed Oct 15, 2017
1 parent 12f0b3a commit ce0273f
Showing 1 changed file with 133 additions and 28 deletions.
161 changes: 133 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,69 @@ _helpers:
then
rm -rf "$PYENV_ROOT"
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
pyenv update
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv update
- &install_python pyenv install --skip-existing --keep --verbose "$PYTHON_VERSION"
- &switch_python pyenv shell "$PYTHON_VERSION"
- &python_version python --version
before_cache:
- brew --cache
- &generic_deploy_base
stage: &deploy_stage_name deploy (PYPI upload itself runs only for tagged commits)
<<: *_mainstream_python_base
deploy: &deploy_step
provider: pypi
# `skip_cleanup: true` is required to preserve binary wheels, built
# inside of manylinux1 docker container during `script` step above.
skip_cleanup: true
user: andrew.svetlov
password:
secure: ZFCicrh4l5zraarOwAwLXzYyGLnrxMHAFEFxF6ZEpECamu4eDsbKAFM/ydYdHoL19ocLr5+Xg1fmgd5tjc29c2rHQh29iDFi7tWai2pDFw+WqeHaV6e7ZJEEnU29OpSRzkGIk+K27mn7ZsB97q3Rkg2JBYRBkeK6HNyZ5YgIaVssXXXuCi5LZ1Y0rg8Nbapes1RUqoHGWgBwlCjAVxp9U7RXqJ6jucHDGUHU+9AgnnlGI7Cqs3xLqp4/xt2VoIjL0XwG2y05WLLpEF3Jwtj2voiPsnSTpUwklXVr1rEwScPCMlImxmWmudvh7xcPtcK9IOHIvk6y/lmNHJeevRn+df50LtBdr+0Wrq/t3Tt5d05XKCgqaLtw2P4GYNfTsx1RmQjHzUlfHKke7UZ1P+GsZTKN9nLKVdFTi2YzQ0TVmr/JjAmVqldRBOvEMnVoDn1rj1gdHMIu4d/gRVTcSS3riey+L2o6NwKjoc7aV5Uz47Z7fjz09Q6xml9eBWAHx9O07Iq+BaCikhBzeHGo+AkIzGMQdCSyQ8tTjQtEq6zWGxolZQFJeW9glTGLSYMfiVaPDEyqxaDm/QKssnZiEIbq1YM018C6ojiA3xbPJrwSZ8l/mnCkxrIcbKcwwtaHFPyP/FicePT01oJAXx08wnwe5H2l6lqkSGgRnGendZNeEuQ=
# Although Travis CI instructs `setup.py` to build source distribution,
# which is default value for distribution option (`distribution: sdist`),
# it will also upload all wheels we've previously built in manylinux1
# docker container using `twine upload -r pypi dist/*` command.
# Also since commit https://github.com/travis-ci/dpl/commit/90b5e39
# it is default that Travis PYPI provider has `skip_upload_docs: true`
# set by default.
# Besides above, we don't do cleanup of `dist/*`, because it's being done
# by Travis CI PYPI deployment provider after upload, unconditionally.
on:
tags: true
all_branches: true
- &osx_pypi_deploy_base_1011
<<: *osx_python_base
<<: *generic_deploy_base
osx_image: xcode7.3
script: skip
after_success: []
env:
- &env_os1011_msg Build and deploy to PYPI of OS X 10.11 binary wheel
- *env_py36
- *env_pyenv
- *env_path
deploy:
<<: *deploy_step
skip_cleanup: false
distributions: bdist_wheel
- &osx_pypi_deploy_base_1012
<<: *osx_pypi_deploy_base_1011
osx_image: xcode8.1
env:
- &env_os1012_msg Build and deploy to PYPI of OS X 10.12 binary wheel
- *env_py36
- *env_pyenv
- *env_path
- &osx_pypi_deploy_base_1010
<<: *osx_pypi_deploy_base_1011
osx_image: xcode6.4
env:
- &env_os1010_msg Build and deploy to PYPI of OS X 10.10 binary wheel
- *env_py36
- *env_pyenv
- *env_path

os: linux

Expand Down Expand Up @@ -124,19 +176,19 @@ jobs:
- <<: *osx_python_base
python: 3.4
env:
- PYTHON_VERSION=3.4.6
- &env_py34 PYTHON_VERSION=3.4.6
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: 3.5
env:
- PYTHON_VERSION=3.5.3
- &env_py35 PYTHON_VERSION=3.5.3
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: *mainstream_python
env:
- PYTHON_VERSION=3.6.1
- &env_py36 PYTHON_VERSION=3.6.1
- *env_pyenv
- *env_path
- <<: *osx_python_base
Expand All @@ -147,38 +199,91 @@ jobs:
- *env_path
# pypy3.5-5.8.0 fails under OS X because it's unsupported

- stage: &deploy_stage_name deploy (PYPI upload itself runs only for tagged commits)
<<: *_mainstream_python_base
# Build and deploy manylinux1 binary wheels and source distribution
- <<: *generic_deploy_base
<<: *_reset_steps
env: Build and deploy to PYPI of manylinux1 binary wheels for all supported Pythons and source distribution
dist: trusty
group: edge
services:
- docker
script:
- mkdir dist # so that it whould have priviliges of the current Travis user
- ./tools/run_docker.sh "multidict"
deploy:
provider: pypi
# `skip_cleanup: true` is required to preserve binary wheels, built
# inside of manylinux1 docker container during `script` step above.
skip_cleanup: true
user: andrew.svetlov
password:
secure: ZFCicrh4l5zraarOwAwLXzYyGLnrxMHAFEFxF6ZEpECamu4eDsbKAFM/ydYdHoL19ocLr5+Xg1fmgd5tjc29c2rHQh29iDFi7tWai2pDFw+WqeHaV6e7ZJEEnU29OpSRzkGIk+K27mn7ZsB97q3Rkg2JBYRBkeK6HNyZ5YgIaVssXXXuCi5LZ1Y0rg8Nbapes1RUqoHGWgBwlCjAVxp9U7RXqJ6jucHDGUHU+9AgnnlGI7Cqs3xLqp4/xt2VoIjL0XwG2y05WLLpEF3Jwtj2voiPsnSTpUwklXVr1rEwScPCMlImxmWmudvh7xcPtcK9IOHIvk6y/lmNHJeevRn+df50LtBdr+0Wrq/t3Tt5d05XKCgqaLtw2P4GYNfTsx1RmQjHzUlfHKke7UZ1P+GsZTKN9nLKVdFTi2YzQ0TVmr/JjAmVqldRBOvEMnVoDn1rj1gdHMIu4d/gRVTcSS3riey+L2o6NwKjoc7aV5Uz47Z7fjz09Q6xml9eBWAHx9O07Iq+BaCikhBzeHGo+AkIzGMQdCSyQ8tTjQtEq6zWGxolZQFJeW9glTGLSYMfiVaPDEyqxaDm/QKssnZiEIbq1YM018C6ojiA3xbPJrwSZ8l/mnCkxrIcbKcwwtaHFPyP/FicePT01oJAXx08wnwe5H2l6lqkSGgRnGendZNeEuQ=
# Although Travis CI instructs `setup.py` to build source distribution,
# which is default value for distribution option (`distribution: sdist`),
# it will also upload all wheels we've previously built in manylinux1
# docker container using `twine upload -r pypi dist/*` command.
# Also since commit https://github.com/travis-ci/dpl/commit/90b5e39
# it is default that Travis PYPI provider has `skip_upload_docs: true`
# set by default.
# Besides above, we don't do cleanup of `dist/*`, because it's being done
# by Travis CI PYPI deployment provider after upload, unconditionally.
on:
tags: true
all_branches: true

# Build and deploy MacOS binary wheels for each OSX+Python combo possible
# OS X 10.10, Python 3.4
- <<: *osx_pypi_deploy_base_1010
python: 3.4
env:
- *env_os1010_msg
- *env_py34
- *env_pyenv
- *env_path
# OS X 10.10, Python 3.5
- <<: *osx_pypi_deploy_base_1010
python: 3.5
env:
- *env_os1010_msg
- *env_py35
- *env_pyenv
- *env_path
# OS X 10.10, Python 3.6
- <<: *osx_pypi_deploy_base_1010
env:
- *env_os1010_msg
- *env_py36
- *env_pyenv
- *env_path
# OS X 10.11, Python 3.4
- <<: *osx_pypi_deploy_base_1011
python: 3.4
env:
- *env_os1011_msg
- *env_py34
- *env_pyenv
- *env_path
# OS X 10.11, Python 3.5
- <<: *osx_pypi_deploy_base_1011
python: 3.5
env:
- *env_os1011_msg
- *env_py35
- *env_pyenv
- *env_path
# OS X 10.11, Python 3.6
- <<: *osx_pypi_deploy_base_1011
env:
- *env_os1011_msg
- *env_py36
- *env_pyenv
- *env_path
# OS X 10.12, Python 3.4
- <<: *osx_pypi_deploy_base_1012
python: 3.4
env:
- *env_os1012_msg
- *env_py34
- *env_pyenv
- *env_path
# OS X 10.12, Python 3.5
- <<: *osx_pypi_deploy_base_1012
python: 3.5
env:
- *env_os1012_msg
- *env_py35
- *env_pyenv
- *env_path
# OS X 10.12, Python 3.6
- <<: *osx_pypi_deploy_base_1012
env:
- *env_os1012_msg
- *env_py36
- *env_pyenv
- *env_path

stages:
- *test_dpl
- *doc_stage_name
- test
- name: *stage_test_osx_name
Expand Down

0 comments on commit ce0273f

Please sign in to comment.