Skip to content

Commit

Permalink
Run Travis CI on release tags (#1146)
Browse files Browse the repository at this point in the history
* Run Travis CI on release tags

* Create sdist before build to avoid unnecessary files

* Fix replacement in .appveyor.yml
  • Loading branch information
danielhers authored and neubig committed Dec 22, 2017
1 parent 9b50b35 commit 674f863
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install:
- conda create -q -n test-env python=%PYTHON_VERSION% cython numpy pypandoc
- activate test-env
- cinst pandoc
- ps: if ($env:APPVEYOR_REPO_TAG -eq $True) { (gc setup.py) -replace '. (version=.)0.0.0', '${1}' + "$env:APPVEYOR_REPO_TAG_NAME" | Out-File -encoding 'UTF8' setup.py }
- ps: if ($env:APPVEYOR_REPO_TAG -eq $True) { (gc setup.py) -replace '. (version=.)0.0.0', "`${1}$env:APPVEYOR_REPO_TAG_NAME" | Out-File -encoding 'UTF8' setup.py }

before_build:
- cmd: md build
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
branches:
only:
- master
- /^[0-9.]*$/
stages:
- test
- name: test_pip
Expand Down
3 changes: 0 additions & 3 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
set -xe

cd "$TRAVIS_BUILD_DIR"
if [[ "$TRAVIS_OS_NAME" == linux ]]; then
python setup.py sdist # Build sdist
fi
twine upload --skip-existing dist/* # Upload to PyPI
4 changes: 4 additions & 0 deletions .travis/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ if [[ "$BACKEND" == cuda ]]; then
sudo ln -s /usr/local/cuda-${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} /usr/local/cuda
fi

if [[ "$TRAVIS_OS_NAME" == linux ]]; then
python setup.py sdist # Build sdist
fi

# Eigen
hg clone https://bitbucket.org/eigen/eigen/ -r 699b659
cd eigen
Expand Down

0 comments on commit 674f863

Please sign in to comment.