Skip to content

Commit

Permalink
Travis experimentation 12
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyod committed Aug 31, 2018
1 parent 5be90d6 commit 4ab5c17
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ clone_depth: 50
# Needed to build Cython
os: Visual Studio 2015


# Expand to a single build - testing for several versions is done on Travs,
# and cibuildwheel builds every windows wheel
environment:
matrix:
- PY_MAJOR_VER: 3
PYTHON_ARCH: "x86_64"
CIBW_SKIP: cp27-* cp33-* cp34-* cp35-*
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_REQUIRES: pytest matplotlib
CIBW_TEST_COMMAND: python -m pytest {project} --doctest-modules


platform:
- x64


# Download Python via conda, update it, then install KDEpy, wheel & cibuildwheel
build_script:
- ps: Start-FileDownload "https://repo.continuum.io/miniconda/Miniconda$env:PY_MAJOR_VER-latest-Windows-$env:PYTHON_ARCH.exe" C:\Miniconda.exe; echo "Finished downloading miniconda"
- cmd: C:\Miniconda.exe /S /D=C:\Py
Expand All @@ -32,17 +34,18 @@ build_script:
- pip install --upgrade cibuildwheel


# Run the tests (but linting is done on Travis)
test_script:
- pytest KDEpy --doctest-modules --doctest-glob="*.rst" --capture=sys


# Store user and password for twine - in preparation for upload
after_test:
- cmd: "echo [pypi] > %USERPROFILE%\\.pypirc"
- "echo username: tommyod >> %USERPROFILE%\\.pypirc"
- "echo password: %TWINE_PASSWORD% >> %USERPROFILE%\\.pypirc"
- python setup.py bdist_wheel

- "echo password: %TWINE_PASSWORD% >> %USERPROFILE%\\.pypirc"s

# If
on_success:
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq 'false' -or $env:APPVEYOR_REPO_TAG -eq 'False') {
Expand Down
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ matrix:
- os: osx
language: generic

# The global environments are for the cibuildwheel python package
# The first 3 global variables are for the cibuildwheel python package
# The remaining 2 are set to assure Python 3 is used on OS X (mac)
env:
global:
- CIBW_SKIP="cp27-* cp33-* cp34-* cp35-*"
Expand All @@ -35,8 +36,9 @@ env:
- PIP=pip3
- PYTHON=python3

# If OS X - install Pyton 3 as python3.
# Print the python version, install general requirements and linting
before_install:
# The default version on OSX is 2.7 - this installs python 3.7 as python3
- if [ "${TRAVIS_OS_NAME:-}" == "osx" ]; then
brew update;
brew upgrade python;
Expand All @@ -46,15 +48,18 @@ before_install:
- $PIP install pep8>=1.7.1
- $PIP install flake8>=3.5.0

# Install the package, create source distribution (worse alternative to wheels)
# Run the tests.
install:
- $PYTHON setup.py develop sdist
- $PYTHON -m pytest KDEpy --doctest-modules --capture=sys

# Linting
before_script:
- $PYTHON -m flake8 --show-source --ignore=F811,W293,W391,W292,W291 --max-line-length=79 --exclude="*examples.py,
*kde.py" KDEpy

# If a tag was used, build wheels and deply to pypi
# If a tag was used, build wheels and deply to pypi
script:
- echo "$TRAVIS_TAG"
- if [ -n "$TRAVIS_TAG" ]; then
Expand Down

0 comments on commit 4ab5c17

Please sign in to comment.