Skip to content

Commit

Permalink
[Packaging] Upload to PyPI from TravisCI
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeyeager committed Nov 1, 2016
1 parent fef07cb commit e774779
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Expand Up @@ -13,6 +13,7 @@ env:
# Fixes for Torch and OpenBLAS
- OMP_NUM_THREADS=1
- OPENBLAS_MAIN_FREE=1
- secure: "WSqrE+PQm76DdoRLRGKTK6fRWfXZjIb0BWCZm3IgHgFO7OE6fcK2tBnpDNNw4XQjmo27FFWlEhxN32g18P84n5PvErHaH65IuS9Nv6FkLlPXZlVqGNxbPmEA4oTkD/6Y6kZyZWZtLh2+/1ijuzQAPnIy/4BEuL8pdO+PsoJ9hYM="
matrix:
- DIGITS_TEST_FRAMEWORK=caffe CAFFE_FORK=NVIDIA
- DIGITS_TEST_FRAMEWORK=caffe CAFFE_FORK=BVLC
Expand All @@ -30,7 +31,8 @@ matrix:
install: true
script:
- ./digits-lint
- env: DEB_BUILD

- env: DIST
services: docker
addons:
apt:
Expand All @@ -41,9 +43,11 @@ matrix:
- gnupg
install:
- git fetch --tags
- pip install twine
script:
- DEBIAN_REVISION=1ppa1~trusty ./packaging/deb/build.sh
- DEBIAN_REVISION=1ppa1~xenial ./packaging/deb/build.sh
- python setup.py sdist bdist_wheel
deploy:
- provider: script
skip_cleanup: true
Expand All @@ -57,7 +61,12 @@ matrix:
on:
repo: NVIDIA/DIGITS
branch: master

- provider: script # not pypi because travis-ci/dpl#334
skip_cleanup: true
script: ./scripts/travis/pypi-upload.sh
on:
repo: NVIDIA/DIGITS
tags: true

cache:
apt: true
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
@@ -1,3 +1,4 @@
include requirements*.txt
recursive-include digits/templates *
recursive-include digits/static *
recursive-include digits/standard-networks *
Expand Down
17 changes: 17 additions & 0 deletions scripts/travis/pypi-upload.sh
@@ -0,0 +1,17 @@
#!/bin/bash
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
# NOTE: don't use "set -x" in this script
set -e

LOCAL_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
ROOT_DIR=$( dirname "$(dirname "$LOCAL_DIR")")

cd $ROOT_DIR
set +x # double-check that x is unset
cat > ~/.pypirc << EOF
[pypi]
repository = https://pypi.python.org/pypi
username = luke.yeager
password = ${PYPI_PASSWORD}
EOF
twine upload -r pypi dist/*

0 comments on commit e774779

Please sign in to comment.