From 0828a7ba6f24ec5fbe3c17cd72a38c63acf16435 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 18 Jan 2020 15:53:57 -0500 Subject: [PATCH 1/2] use travis-ci to build wheels and upload to pypi Update .travis.yml Update .travis.yml Update .travis.yml Update .travis.yml Update .travis.yml tf --- .travis.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e0e8280352..c5b511b6bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,10 @@ addons: - g++-7 - gcc-8 - g++-8 -matrix: +jobs: include: - - python: 3.6 + - stage: unit tests + python: 3.6 env: - CC=gcc-4.8 - CXX=g++-4.8 @@ -71,6 +72,23 @@ matrix: - CC=gcc-8 - CXX=g++-8 - TENSORFLOW_VERSION=2.1 + - stage: build whls + services: docker + env: + - TWINE_USERNAME=__token__ + - CIBW_BUILD="cp36-* cp37-*" + - CIBW_BEFORE_BUILD="pip install tensorflow && sed -i 's/libresolv.so.2\"/libresolv.so.2\", \"libtensorflow_framework.so.2\"/g' \$(find / -name policy.json)" + - CIBW_SKIP="*-win32 *-manylinux_i686" + - CC=gcc-7 + - CXX=g++-7 + - TENSORFLOW_VERSION=2.1 + install: + - python -m pip install twine cibuildwheel==1.1.0 scikit-build + script: + - python -m cibuildwheel --output-dir wheelhouse + - python setup.py sdist + after_success: + - if [[ $TRAVIS_TAG ]]; then python -m twine upload wheelhouse/*; fi before_install: - pip install --upgrade pip - pip install --upgrade setuptools From fa84b3bac67df84b940681a591726a72f42f7614 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sun, 19 Jan 2020 04:33:35 -0500 Subject: [PATCH 2/2] also upload tar.gz --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c5b511b6bc..019256c993 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,7 +88,7 @@ jobs: - python -m cibuildwheel --output-dir wheelhouse - python setup.py sdist after_success: - - if [[ $TRAVIS_TAG ]]; then python -m twine upload wheelhouse/*; fi + - if [[ $TRAVIS_TAG ]]; then python -m twine upload wheelhouse/*; python -m twine upload dist/*.tar.gz; fi before_install: - pip install --upgrade pip - pip install --upgrade setuptools