diff --git a/.travis.yml b/.travis.yml index 56d1ef710..6ace4e7d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,12 @@ matrix: fast_finish: true include: + + # Standard linux; also used for sdist'ing + - os: linux + env: SETUP_CMD='test' + DO_DIST=YES + # Try MacOS X - os: osx osx_image: xcode8.3 @@ -152,3 +158,12 @@ after_success: # If coveralls.io is set up for this package, uncomment the line below. # The coveragerc file may be customized as needed for your package. - if [[ $SETUP_CMD == *coverage* ]]; then coveralls --rcfile='pycraf/tests/coveragerc'; fi + + - echo "TRAVIS_TAG" $TRAVIS_TAG + - echo "DO_DIST" $DO_DIST + - | + if [[ $TRAVIS_TAG && $DO_DIST]]; then + conda install twine + python setup.py sdist + python -m twine upload dist/*.tar.gz + fi diff --git a/appveyor.yml b/appveyor.yml index 62b965210..ff73cb381 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,3 +50,16 @@ build: false test_script: - "%CMD_IN_ENV% python setup.py test" + +after_test: + # This step builds your wheels. + - "%CMD_IN_ENV% python setup.py bdist_wheel" + - "%CMD_IN_ENV% python setup.py bdist_wininst" + - "%CMD_IN_ENV% python setup.py bdist_msi" + +on_success: +# You can use this step to upload your artifacts to a public website. +# See Appveyor's documentation for more details. Or you can simply +# access your wheels from the Appveyor "artifacts" tab for your build. +# APPVEYOR_REPO_TAG is true only if commit is a tag +- ps: "If ($env:APPVEYOR_REPO_TAG -eq \"true\") {\n conda install twine\n python -m twine upload (resolve-path dist\\*.whl)\n }"