From 1be2d96117fc55ebd2ba0a9ed6ca86c426251f5a Mon Sep 17 00:00:00 2001 From: Timothy Makobu Date: Thu, 27 Aug 2020 19:07:13 +0300 Subject: [PATCH] automatic wheel builds for linux, osx and windows on travisci --- .travis.yml | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2d8f037bd..046c348e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ --- language: python python: - - "2.7" - "3.5" - "3.6" - "3.7" @@ -27,3 +26,37 @@ install: fi script: - make test + +jobs: + include: + # perform a linux build + - services: docker + # and a mac build + - os: osx + language: shell + # and a windows build + - os: windows + language: shell + before_install: + - choco install python --version 3.8.5 + - export PATH="/c/Python38:/c/Python38/Scripts:$PATH" + + env: + global: + - TWINE_USERNAME=__token__ + # Note: TWINE_PASSWORD is set to a PyPI API token in Travis settings + + install: + - python3 -m pip install cibuildwheel==1.5.5 + + script: + # build the wheels, put them into './wheelhouse' + - python3 -m cibuildwheel --output-dir wheelhouse + + after_success: + # if the release was tagged, upload them to PyPI + - | + if [[ $TRAVIS_TAG ]]; then + python3 -m pip install twine + python3 -m twine upload wheelhouse/*.whl + fi