Skip to content

Commit

Permalink
Merge pull request #112 from mochic/enh/continuous-deployment-pypi-1
Browse files Browse the repository at this point in the history
pypi deployment from travis for linux & osx
  • Loading branch information
neuromusic authored Oct 16, 2018
2 parents 8abaa83 + d35b57a commit 6335ff2
Showing 1 changed file with 77 additions and 71 deletions.
148 changes: 77 additions & 71 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,97 @@ language: generic
python: 3.6

matrix:
exclude:
- python: 3.6
include:
- os: linux
sudo: required
compiler: gcc
env:
- CONDA_PYTHON_VERSION=2.7
- os: linux
sudo: required
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.5
- os: linux
sudo: required
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.6
- os: osx
compiler: gcc
env:
- CONDA_PYTHON_VERSION=2.7
- os: osx
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.5
- os: osx
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.6
exclude:
- python: 3.6
include:
- os: linux
sudo: required
compiler: gcc
env:
- CONDA_PYTHON_VERSION=2.7
- os: linux
sudo: required
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.5
- os: linux
sudo: required
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.6
- os: osx
compiler: gcc
env:
- CONDA_PYTHON_VERSION=2.7
- os: osx
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.5
- os: osx
compiler: gcc
env:
- CONDA_PYTHON_VERSION=3.6

install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
else
else
sudo apt-get update;
fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
else
else
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
fi
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a

- conda create -q -n build-environment python=$CONDA_PYTHON_VERSION
- conda create -q -n test-environment python=$CONDA_PYTHON_VERSION
- source activate build-environment
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- source activate test-environment
- pip install pytest pytest-cov codecov
- conda create -q -n build-environment python=$CONDA_PYTHON_VERSION
- conda create -q -n test-environment python=$CONDA_PYTHON_VERSION
- source activate build-environment
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- source activate test-environment
- pip install pytest pytest-cov codecov

before_script:
- source activate build-environment
- python setup.py build_ext --inplace
- python setup.py bdist_wheel
- source activate test-environment
- pip install --find-links=dist neuroglia
- source activate build-environment
- python setup.py build_ext --inplace
- python setup.py bdist_wheel
- source activate test-environment
- pip install --find-links=dist neuroglia

script:
- source activate test-environment
- pytest --cov=neuroglia
- codecov
- source activate test-environment
- pytest --cov=neuroglia
- codecov

deploy:
- provider: releases
tag: $TRAVIS_TAG
api_key: $GITHUB_TOKEN
file_glob: true
file: "dist/*"
skip_cleanup: true
draft: false
prerelease: true
on:
tags: true
- provider: releases
tag: $TRAVIS_TAG
api_key: $GITHUB_TOKEN
file_glob: true
file: "dist/*"
skip_cleanup: true
draft: false
prerelease: true
on:
tags: true
- provider: pypi
user: "mochic"
password:
secure: "zztnlwUplr7pbtBs3c3oM/CjlIAZSH1RT2msJWZyz6TXhIUZVnI4WyVudBSl452Tjo12X9EXLHdCf6ToHuX3cwUGTwzn7HNncuJE96Xxw4qb2T9p0VTYgPZ6aEq16M4UhpO+E+T4xbKBz7+GH0ZF3THO64Rkq2SNRmf4/EZgPJv4PVFEpVf2CPWIRtbtIARMi6Vde4xUQqQ6KflhFK54/XR8cECjWcG2bdeu2y2iVj7UemkFoLd6Pzy04o2rWJtKey3tEABFlxdX+pD2t5GQ1vIp2xzV/s/U+NLE39LZywPLz6HX3UpUP1jfwFKlHnaX57lIf8oY957F0RJaEjdU6y65TULnH29yONXgGrHY8UekoIQD47Bgq6c92Al8k7CFDbCJ1wP5xkaDUThPJbOvRltQwKCN6iem5nQAuC1Q/RGph8jhFChiGqIUE2DnbMfEy/MaNNt9fT6p/8Z2gcimcotZG9VqzOTJk54wr3UY7yvZAaE3lwGoQT80ZndWCmwf7n8mICLuUDsQ35MmQBzjtphMmXFLP3eGCCXqNDp2vupmHk2GWKCmL8urOpCz0Z2bOfYLzzDOriH9VeKvu9D61myCDV2C9eCq8O8OCM2qyT2v6q/h+85QyZK30netn9EuRZ9eSdw5RNb4h8LzYoSR9efs2QMqZOma3uWKHZ6HEq4="
on:
tags: true

0 comments on commit 6335ff2

Please sign in to comment.