зеркало из https://github.com/Azure/blobxfer.git
94 строки
5.3 KiB
YAML
94 строки
5.3 KiB
YAML
language: python
|
|
|
|
cache: pip
|
|
|
|
matrix:
|
|
include:
|
|
- python: 2.7
|
|
- python: 3.4
|
|
- python: 3.5
|
|
- python: 3.6
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- pandoc
|
|
# - language: generic
|
|
# os: osx
|
|
# before_install:
|
|
# - brew update
|
|
# - brew install python3
|
|
# - virtualenv -p python3 py3
|
|
# - source py3/bin/activate
|
|
|
|
env:
|
|
global:
|
|
- BLOBXFER_ARTIFACT=blobxfer-$TRAVIS_TAG-$TRAVIS_OS_NAME-x86_64
|
|
- secure: XqrQXqxLRRFvhD9BA5AKoH3nPBA22xihQ1f4Q16bumW9WlpWv/zbbOa3eWIbCm2KqT+yOaXQN8vhDiBsGdJo6tvV4aZtPu2H5v4AsE5lmYsqeTZKh6w8EIfWeeKIzF5HoTKF35JK84+cpWRh42d0Shr2Awf1YlAu1pH6BcVkFQ5qV42rD+XH3TJJAwT97I0bARhkv/UJdf6gyIIw2G4FIDEyXfH3Lvxlmbnq85OL5p8VzTda70/7Mo2T3/rQofwVyRmMlWLLEuZuUzyo7R9KGpKdYMTijkLdFw9tSHOlcuW46iQimfWPsvdXCv8FUiDmulPG2a7fF5w7f89CDmupOhK0xd20C1v71uVa+f/k28qskA5PXaG0nzPQLWF8Avd/uehgXsaBNvLrC7PQZHOea/Ce4J5Yhdd6eigUmduP0GuOqZPm71Z8CxdOxNpOfUEE6Jx0eKW8hQXDt4N7ZwTU+kP+bOEKxPjky1Reg6DsiuRcrVHwYgk7RjidRr4kHLNam2h11NBDPC+8sIhTv4UBhtjspnrk2wT236uVBQWpGk5niPaMPCcdnCIghSMIQQdBSbv7huwv5MJOsjLcjbGtT1u0JgMtXI/TOjNsAZP5YzPPFQpzg8LwJ2qmEVTLOy6EJ5bJdWFCN1GPlupKbwURmpKyIqCdZoSnYnsgkEF0PFA=
|
|
- secure: F15Weue/tcIB7hcZFTOEVxQSwy5D0124Stq185bEudE3orpsscNp97FCNUczQHqt38OrRrswTU/HwpuJQF0G54RxLWQspmef7dgRIJSboQUd9j5Se/bmRmSsBGvffOCLyEDU8Lq0tT8xb2o30xclcqX9fb9EdXVlbHlIqeGnmkEEmgnCxUkfHEQW+kYN2CRVeVwKjnYnyByFtXErTjwc1Mp4IOpWjsclS+AIe2S0gAU5jx8ZqImXKUmhkm7OOIyOYaJjT+0r/MrpSJgwjjb+yPazhOL6tOD1gCFGds5NwvZd8B7cpD/DqgakEdQWz+pvedJZQTdfxSQPK7qYz43tjSwQhxIHO02hpSxq5T5feUuXOiLKlrona6aTLnzsr/ftJ0KlMElihwEJPCzrb9I5oxbCMz/ZH2a1yzGVUaeob3we1vIFN66dB27n0zEE3wxhJOcul5Y8SIQRrrMVLPYZmJr8HxV220lbadUOJInicyM5EsO+S7jLlb/b2n4i2mr3J0eNif1MaxLrj1NcbQOVjyjg/n9Zkw8fNB7x9qfsWmIMovKYQKFQpNW1sv5T5CR5zqV0in6eKvgw6qyt6oxxMN/ViZ0vyvywDvsEcH7pTZGsnC/VDrkEj3Z62zFa8ewY4W1AGQDWZtJBnPJXx2wmFWgnMG8mSpFuI/gJDkgprEI=
|
|
|
|
install:
|
|
- travis_retry pip install --upgrade pip
|
|
- travis_retry pip install --upgrade setuptools wheel
|
|
- travis_retry pip install --upgrade codecov tox-travis
|
|
|
|
script:
|
|
- tox
|
|
|
|
after_success:
|
|
- codecov
|
|
- |
|
|
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
|
|
echo "Not building binary with PR $TRAVIS_PULL_REQUEST"
|
|
return
|
|
fi
|
|
if [[ "$TRAVIS_PYTHON_VERSION" != "3.6" ]]; then
|
|
echo "Not building binary without Python 3.6"
|
|
return
|
|
fi
|
|
if [[ ! -z "$TRAVIS_TAG" ]]; then
|
|
export UPLOAD_PATH="releases/$TRAVIS_TAG"
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
brew install pandoc
|
|
else
|
|
travis_retry pip install pypandoc
|
|
fi
|
|
elif [[ "$TRAVIS_BRANCH" == "master" ]] || [[ "$TRAVIS_BRANCH" == "develop" ]]; then
|
|
export BLOBXFER_ARTIFACT="blobxfer-${TRAVIS_BRANCH}-${TRAVIS_BUILD_NUMBER}-$TRAVIS_OS_NAME-x86_64"
|
|
export UPLOAD_PATH="builds/$TRAVIS_BRANCH"
|
|
else
|
|
echo "Invalid tag=$TRAVIS_TAG or branch=$TRAVIS_BRANCH to build binary"
|
|
return
|
|
fi
|
|
echo "BLOBXFER_ARTIFACT=$BLOBXFER_ARTIFACT UPLOAD_PATH=$UPLOAD_PATH"
|
|
if [[ ! -e "bin/$BLOBXFER_ARTIFACT" ]]; then
|
|
virtualenv -p python3 pyi
|
|
$SHELL -c "set -e; source pyi/bin/activate; \
|
|
pip install pyinstaller; \
|
|
pip install --no-cache-dir -e .; \
|
|
pyinstaller -F -n $BLOBXFER_ARTIFACT -p blobxfer:cli --additional-hooks-dir blobxfer --exclude-module future.tests --exclude-module future.backports.test --exclude-module future.moves.test --distpath bin cli/cli.py; \
|
|
deactivate"
|
|
bin/$BLOBXFER_ARTIFACT upload --remote-path $UPLOAD_PATH --local-path bin/$BLOBXFER_ARTIFACT --strip-components 1 --file-md5 --overwrite
|
|
fi
|
|
|
|
deploy:
|
|
- provider: pypi
|
|
distributions: "sdist bdist_wheel"
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|
|
condition: "$TRAVIS_PYTHON_VERSION == 3.6"
|
|
user: alfpark
|
|
password:
|
|
secure: IG7hwkaRS3iVJVwKmJng60q2/RX3nvfs5ZCW9CmRjF57cc2yEzB1O+Z7YpbX4+yI9zlebTBH+1HEeX9J8kb0jCMgtjUIFLcOFz977b8y/BbY93ffQlFt2p2EQHKOcOjTbXMvWOiR3LO+5DWBg11oSKlCZkZkjjDbUIe8mleeEls6s1VxjP0MDLbbgSh09Sdn5+FD24wOnkkW9OrKZHm4kghOwnhqquwMDilO9iDsAAZBF7t2BNvJzfTeZxeHCImvId3jN3EskHuoLbIcexDiwXjr5alo5+OdglMVjYI6+bVediFDw4wKTSNeHxkeScoelZJLy1SiP9FiEmUlHBeQaVKA1MB4BenXTrFHys+tGa1FuTack0pWASelqZ88xtrW09/QSqToA3pade4lMF7HAB7qpPIy1NaniVOnks8c7h9s0okh7WYtW/zdX8enQWJVISPKqS6Mtb0IUEVZbePsrWprkHlscW/Gg8p8TRCVA/7CgdA66PrvZSTKvbKBpAHkxkxNmA8LvTIzqBrEBsUIY0LY7omGOksqGivYh4xPP34MrVrJag1gpKOjNz5ZvvghDz3iI8PPJSuZoBT3fCRaBg4uaeDWc0Z+KXMtCJmfqI61oW5kMABuncoO/KEaC916Y0TDz01Wr/+fCf68VNB2iXaNklTv173Jy3hA+248oig=
|
|
- provider: releases
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|
|
condition: "$TRAVIS_PYTHON_VERSION == 3.6"
|
|
draft: true
|
|
overwrite: true
|
|
tag_name: $TRAVIS_TAG
|
|
file: bin/$BLOBXFER_ARTIFACT
|
|
api_key:
|
|
secure: QCcrLa2x15RVNX42x6Ts4E/AU4QvwacuoQJ5BlFK6hdevRZYyRSQB3yBD6ZhAqi79qxd7KpRoPj8mu0N3WaZuB3XtQ2scxQLvN5vueC6c9A2Ic9venoLfVYG9Np4jOYxwx3QRtMPA6SNEmxNxBK+jjClwNi71vshTwo14z0/IW7Zi7WNEzoZW3iNj7e+zbaVvuyx+vGI+Ckgjyy7OgaulNtlHG/vYuJuAMn7WzbyGuSQTuqI2npKvykumi9rNSQpmR+2WP9gbo8D+WU+iESHJ+r0YUbZRWDwGHA7fvbCNLMwFdXwaXccc6jozxqULTmt6mNnlSpaKduYiSoru9L8+kzxR1b+xYEK0fGr6/khABt5O26Pk6tCynKz4LrurSefA3mHrNYIT3PGGUvUTJAhSVaK9O/ag2qkDTA0NGp7KV+xDG4KCWvqeuPssqh9ppDl27T1s/aWMtKeeswCRhGMlfCICg9hhPzyc97ZBzl7DLRPITUceSzc2cGp88zGYdlJEg+5yuSl1j+Al5jmWMxuLF1MLOmFYw1pA1z7zPpcq8zzC0t5eu6n/fFh6k57sZQ6VDeS4kix4q0W6XjIFx4yA/Aa4CpeEAOb+jPzZxRuQ/UvRgL4M7lnb8aIOqNcoXEcccgnrcULjJ9pcJCMHE0p5WU7JnF8mpazJude51yikx0=
|