From 674f863a27f2b05ed99bd7cc5c3d927b87bda262 Mon Sep 17 00:00:00 2001 From: Daniel Hershcovich Date: Fri, 22 Dec 2017 03:17:10 +0200 Subject: [PATCH] Run Travis CI on release tags (#1146) * Run Travis CI on release tags * Create sdist before build to avoid unnecessary files * Fix replacement in .appveyor.yml --- .appveyor.yml | 2 +- .travis.yml | 1 + .travis/deploy.sh | 3 --- .travis/install_dependencies.sh | 4 ++++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 92b9748a9..d6c0ef0cc 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/.travis.yml b/.travis.yml index 9ed404f3e..04c132d97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ env: branches: only: - master + - /^[0-9.]*$/ stages: - test - name: test_pip diff --git a/.travis/deploy.sh b/.travis/deploy.sh index a63714a15..d92b5124f 100755 --- a/.travis/deploy.sh +++ b/.travis/deploy.sh @@ -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 diff --git a/.travis/install_dependencies.sh b/.travis/install_dependencies.sh index dbba465ab..f64c40c37 100755 --- a/.travis/install_dependencies.sh +++ b/.travis/install_dependencies.sh @@ -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