forked from Azure/blobxfer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (97 loc) · 5.69 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
language: python
cache: pip
matrix:
include:
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
addons:
apt:
packages:
- pandoc
# disable python3.7 for now, pep479 stopiteration behavior change
# breaks tests
# use workaround below until travis supports 3.7
# - python: 3.7
# dist: xenial
# sudo: true
# - 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"
chmod +x bin/$BLOBXFER_ARTIFACT
sha256sum bin/$BLOBXFER_ARTIFACT | cut -d' ' -f1 > bin/${BLOBXFER_ARTIFACT}.sha256
cat bin/${BLOBXFER_ARTIFACT}.sha256
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: p6i4ircy+h1HaIlVz+SsdA3yoyG86/X12QWVDyC2Vw9M53/rPjQKn/dbhQSTcvWZ90EmYNOnmkBT9tc7B9iRkixmCminic0oUX0bmEhvenscW8Bbhaa2Uh9P2AJtd3gsVcicWzaNhtnjui3/rJRljolGA1PwfXal0Ryg24NaBd2VRKCwOU4xsZZ2fCDZ02cotsehRvGeUa4d54CJ6eBuzN08q9AXYh9IGWCngPNo68XRRs+gDQ65kwmUYp6tIFB+zbL/0erbB1E88F+Dq6Ac/vNCZjjhXor8fDqoPJmch3JZaP091bHoPD+rWnEb8Vm6B4nBBwhFMbKg/9Kt3Y6Bmb2ifOBz9EPfeSxxXVetKOpOKxKfaGj7mcbG8w64uBxQxr/GJLmpVMbFCJRh1PeRL9J9deFwdANBvflgQzV0XwKOfv2N03dmRtJOXwmXPO/FDmr6oojRT5JHj8KpbO6/adCm9COm9mhjhD6ZOPX7ppBGeXmD5sGKrXX+rVfdtYeCLrawGMf/ZmSWHiT0q1KTPLrNaKK0Y2o5XCUKXcgcCOIPaP03Kqje++RxP3Ef5x2uB2o2ertsrY4rk0UyR93+ARgko/MvW8OlQJbz9oUh3qh87IdjOBgY6OTObTEVAGZWYRKQMKRxzTDGRuk/D1gXcXI7VfBZwylSEvHjE85rLJ4=
- 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}
- bin/${BLOBXFER_ARTIFACT}.sha256
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=