Skip to content

Commit

Permalink
Merge pull request #29 from onnx/pypi-test
Browse files Browse the repository at this point in the history
Deploy wheel to AWS; Make Mac packages be compatible with different protobuf
  • Loading branch information
jcwchen authored Nov 6, 2020
2 parents 5e70e1f + 473deeb commit a6b429a
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 69 deletions.
128 changes: 62 additions & 66 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
env:
global:
- REPO_DIR=onnx
- BUILD_COMMIT=0c070abb0c40fec649f81a73a75b0098662ec486
- BUILD_COMMIT=994c6181247d7b419b28889fc57d5817e2089419
- PLAT=x86_64
- PB_VERSION=2.6.1
- UNICODE_WIDTH=32
- REPO=https://upload.pypi.org/legacy/
- TEST_REPO=https://test.pypi.org/legacy/
- secure: qvdFuTC+kSgm8uPvTOG4NRE6EnuH6/AsOeGmYJhxaynfxGK9skp+DZv2ioT2HE/kxW+PekkVsyrcjZc185cZFXtiTxVkWakbjoD3Bk8YZrjIjcHOjdz4nu1KePVOa8ymqangQhwKekBk2eQ84Ktx38DiuySLSjHbZZ6Z9Rqxeh6ucYLD2rgjGSTjDlMlcvzojiJ213a9xVQsaY9gnagYds6U0zHHPRj5pHrcLD0N9tI0bdyxxAGglT6T2cGwIvLx1/Kcseedqv7hONN4TYJrZnaldYf1TdLsBwtU4proiiv0+eckXAi9Pum/hNMVQhvvm/TpDGLDDKflpMzhSS9CBdW0WVbFnRWONqXyWodlIWaxuUVIqfjHR8vC7Qg1RM50G04h4di2CuSS00fzR6weAfcMDYCbgFRq7KeSCueVjF9HTLLPjhLCwo6KvinpjRk2vDZyd5Y89pXzn0BxHxK3DwePZhFmjUo89MrSDYMm12Os6TEOGsxK+XMKj92i8YVRgE2z3O/o/D7da33MsbjhkLqzUjbqS1zv+KwEPcF6Gyoo/nRxTcAv1uVyS8WRkS8GmEg8Vpr7QIAdK9gdTbS8xYSEBG3nJhjQjrasS9RzsYKENyqNmfM54jYf7/pCq3D/whv/njaYQ061E7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tbJic8W+SAdnTutyWegoFChr0EcW7HWOPMikyaO0nZ68wRJu+XbqP/B9bsK7bgElXEOqHAKcs+4OAEmiLZkNLBsetB/8PYGcHRrj2hn1WWNpNR47DAYXaoz4F338oKCFjQV8NuWEnd8RUWFp5irO7fK82U2hWPVgJsEsIJXLs79dNZEeQbmXQodF+9gEfM5hxCZFV2FvOqEyb1oFs1h7RlTDtgidht+sMfu+oh2tOfPg8Ci6MRo=
- secure: RLmYfdQgXzHOaKVm9xq6Ao5MHXeHw9Y8YXPb0dEqPBtmMntIqcVYMKrO1h/bTAttP1LKlRMJOXS2+eiZgDzClfdvryzNgaFEXNJIY0mZ1AiraQG3UeMmJp3B+5fVLCGHCkLfqEtI5Tka46jquiUsqCajrMnHuRRQL1IPFSuPMa4lvPVSIEmBwWQIIIzfJvJrIDt5d2hVJCQ3G2Z0ylsJFQjJwbhWGT71ULpre7JWsy8XHqiFdZF3P+ELHxjdpz6XxDJkSHMZ5VIkg0XjBxAupmi8tr3vsAgRb8hfBsU/KqPRL2DLXQ0eI364+0ed4SC32aBBL1lETtiz/RLMQDdD8E62DMXLzpmqQT/dM5X3w6lWLOlCv8BAoow1iLkt8TcP2k9DXl7FCEvYagWIt2c04B3lqahdC+LM0Rx3Yc6crufWm7PzaHObFwhOzdHw3/z6J0NgvqWhVckZU4Use1bvCE4JSV8b57x/nclZRXVfu8UMAIvJAUhUs3TYOKh4V4Bgf6tD/k0K/x8Nh2qTpyEWPGq5txzJX+QEZu0SWYIULv6G3Ils9WUXplYmg77ybU/kDDoGNmjbgrdQrOPs4cdAd8iXsW1PDHBYXrbVs3mCCEk2R2o51gtVXlgWjeNYn0bXe+Ac4nHSi196ctJ4ZPLvcM5f0ccUP1wgo/h8Uo3iQWU=
addons:
artifacts:
s3_region: "us-west-1" # defaults to "us-east-1"
debug: true
paths:
- $(git ls-files -o | grep .whl |tr "\n" ":")
target_paths:
- /test

language: python
# Default Python version is usually 2.7
Expand All @@ -22,112 +32,100 @@ services: docker
# osx_image: xcode9.3beta
matrix:
include:
- os: osx
- name: "OSX Python 3.5"
os: osx
language: generic
sudo: required
osx_image: xcode9.3beta
env:
- MB_PYTHON_VERSION=3.5
- ONNX_ML=1
- MACOSX_DEPLOYMENT_TARGET=10.9
- os: osx
- name: "OSX Python 3.6"
os: osx
language: generic
sudo: required
osx_image: xcode9.3beta
env:
- MB_PYTHON_VERSION=3.6
- ONNX_ML=1
- MACOSX_DEPLOYMENT_TARGET=10.9
- os: osx
- name: "OSX Python 3.7"
os: osx
language: generic
sudo: required
osx_image: xcode9.3beta
env:
- MB_PYTHON_VERSION=3.7
- ONNX_ML=1
- MACOSX_DEPLOYMENT_TARGET=10.9
- os: osx
- name: "OSX Python 3.8"
os: osx
language: generic
sudo: required
osx_image: xcode9.3beta
env:
- MB_PYTHON_VERSION=3.8
- ONNX_ML=1
- MACOSX_DEPLOYMENT_TARGET=10.9
- os: osx
language: generic
sudo: required
osx_image: xcode9.3beta
env:
- MB_PYTHON_VERSION=2.7
- ONNX_ML=1
- MACOSX_DEPLOYMENT_TARGET=10.9
- os: linux
sudo: required
env:
- MB_PYTHON_VERSION=2.7
- ONNX_ML=1
- os: linux
- name: "Linux x64 Python 3.5"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=2.7
- ONNX_ML=1
- UNICODE_WIDTH=16
- os: linux
sudo: required
env:
- MB_PYTHON_VERSION=2.7
- ONNX_ML=1
- PLAT=i686
- os: linux
sudo: required
env:
- MB_PYTHON_VERSION=2.7
- ONNX_ML=1
- UNICODE_WIDTH=16
- PLAT=i686
- os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.5
- ONNX_ML=1
- os: linux
- MB_PYTHON_VERSION=3.5
- MB_ML_VER=2010
- ONNX_ML=1
- name: "Linux x64 Python 3.6"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.6
- ONNX_ML=1
- os: linux
- MB_PYTHON_VERSION=3.6
- MB_ML_VER=2010
- ONNX_ML=1
- name: "Linux x64 Python 3.7"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.7
- MB_PYTHON_VERSION=3.7
- MB_ML_VER=2010
- ONNX_ML=1
- os: linux
- name: "Linux x64 Python 3.8"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.8
- MB_ML_VER=2010
- ONNX_ML=1
- os: linux
- name: "Linux x86 Python 3.5"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.5
- ONNX_ML=1
- PLAT=i686
- os: linux
- MB_PYTHON_VERSION=3.5
- MB_ML_VER=2010
- ONNX_ML=1
- PLAT=i686
- name: "Linux x86 Python 3.6"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.6
- ONNX_ML=1
- MB_PYTHON_VERSION=3.6
- MB_ML_VER=2010
- ONNX_ML=1
- PLAT=i686
- os: linux
- name: "Linux x86 Python 3.7"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.7
- ONNX_ML=1
- MB_PYTHON_VERSION=3.7
- MB_ML_VER=2010
- ONNX_ML=1
- PLAT=i686
- os: linux
- name: "Linux x86 Python 3.8"
os: linux
sudo: required
env:
- MB_PYTHON_VERSION=3.8
- MB_ML_VER=2010
- ONNX_ML=1
- PLAT=i686

Expand All @@ -145,16 +143,14 @@ script:

after_success:
- >
if [ -n "$TRAVIS_TAG" ]; then
if [[ $MB_PYTHON_VERSION == "3.5" && $TRAVIS_OS_NAME == "osx" ]]; then
echo "Python 3.5 on Mac will fail while uploading PyPi package. Save the wheel to AWS anyway.";
elif [ -n "$TRAVIS_TAG" ]; then
pip install twine;
pip install pyOpenSSL ndg-httpsclient pyasn1 || true;
python -m twine upload --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/*.whl --repository-url $REPO -u $PYPI_USERNAME_TRAVIS -p $PYPI_PASSWORD_TRAVIS ;
echo "Deployed to PyPI.";
else
echo "Not deploying as not a tagged commit.";
fi
- >
if [ "$TRAVIS_BRANCH" == "pypi-test" ]; then
elif [ "$TRAVIS_BRANCH" == "pypi-test" ]; then
pip install twine;
pip install pyOpenSSL ndg-httpsclient pyasn1 || true;
ls ${TRAVIS_BUILD_DIR}/wheelhouse/;
Expand Down
11 changes: 8 additions & 3 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
function build_wheel {
build_libs
export ONNX_ML=1
time ONNX_NAMESPACE=ONNX_REL_1_7 build_bdist_wheel $@
time ONNX_NAMESPACE=ONNX_REL_1_8 build_bdist_wheel $@
}

function build_libs {
Expand All @@ -12,7 +12,7 @@ function build_libs {
export NUMCORES=`sysctl -n hw.ncpu`
fi
echo Using $NUMCORES cores

# Linux
if [ -z "$IS_OSX" ]; then
APT_INSTALL_CMD='yum -y install'
# Install protobuf
Expand All @@ -26,8 +26,13 @@ function build_libs {
cd ${pb_dir} && ./configure && make -j${NUMCORES} && make check && make install && ldconfig 2>&1 || true
ccache -s
export PATH="/usr/lib/ccache:$PATH"
# Mac
else
brew install ccache protobuf
brew install ccache
# Install protobuf 3.11.3 due to compatibility
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/66613cae31ad29ac4b1af532220aeb9e11d9672f/Formula/protobuf.rb
brew install protobuf.rb
pip install protobuf==3.11.3
export PATH="/usr/local/opt/ccache/libexec:$PATH"
echo PATH: $PATH
pip install pytest-runner
Expand Down

0 comments on commit a6b429a

Please sign in to comment.