Skip to content

Commit

Permalink
Use travis stages instead of matrix (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
hardbyte committed May 13, 2019
1 parent f087770 commit c42b687
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 61 deletions.
129 changes: 69 additions & 60 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
language: python

# Linux setup
dist: xenial

cache:
directories:
- "$HOME/.cache/pip"

python:
# CPython; versions pre-2.7 and 3.0-3.5 have reached EOL
- "2.7"
Expand All @@ -10,81 +17,83 @@ python:
# PyPy:
- pypy # Python 2.7
- pypy3.5 # Python 3.5
- pypy3

os:
- linux # Linux is officially supported and we test the library under
# many different Python verions (see "python: ..." above)
env:

# - osx # OSX + Python is not officially supported by Travis CI as of Feb. 2018
# nevertheless, "nightly" and some "*-dev" versions seem to work, so we
# include them explicitly below (see "matrix: include: ..." below).
# They only seem to work with the xcode8.3 image, and not the newer ones.
# Thus we will leave this in, until it breaks one day, at which point we
# will probably reomve testing on OSX if it is not supported then.
# See #385 on Github.

# - windows # Windows is not supported at all by Travis CI as of Feb. 2018
install:
- if [[ "$TEST_SOCKETCAN" ]]; then sudo bash test/open_vcan.sh ; fi
- travis_retry pip install .[test]

# Linux setup
dist: xenial
script:
- |
# Run the tests
python setup.py test
# preserve the error code
RETURN_CODE=$?
# Upload the coverage to codecov.io
codecov -X gcov
# set error code
(exit $RETURN_CODE);
jobs:
allow_failures:
# we allow all dev & nightly builds to fail, since these python versions might
# still be very unstable
- python: 3.8-dev
- python: nightly

matrix:
include:
# building the docs
- python: "3.7"
env: BUILD_ONLY_DOCS=TRUE
# Note no matrix support when using stages.
# Stages with the same name get run in parallel.
# Jobs within a stage can also be named.

# Unit Testing Stage

# testing socketcan on Trusty & Python 3.6, since it is not available on Xenial
- os: linux
- stage: test
name: Socketcan
os: linux
dist: trusty
python: "3.6"
sudo: required
env: TEST_SOCKETCAN=TRUE
# testing on macOS; see "os: ..." above
- os: osx

# testing on OSX
- stage: test
os: osx
osx_image: xcode8.3
python: 3.6-dev
- os: osx
- stage: test
os: osx
osx_image: xcode8.3
python: 3.7-dev
- os: osx
- stage: test
os: osx
osx_image: xcode8.3
python: nightly

allow_failures:
# we allow all dev & nighly builds to fail, since these python versions might
# still be very unstable
- python: 3.8-dev
- python: nightly

install:
- if [[ "$TEST_SOCKETCAN" ]]; then sudo bash test/open_vcan.sh ; fi
- if [[ "$BUILD_ONLY_DOCS" ]]; then travis_retry pip install -r doc/doc-requirements.txt; fi
- travis_retry pip install .[test]

script:
- |
if [[ "$BUILD_ONLY_DOCS" ]]; then
# Build the docs with Sphinx
# -a Write all files
# -n nitpicky
python -m sphinx -an doc build
else
# Run the tests
python setup.py test
# preserve the error code
RETURN_CODE=$?
# Upload the coverage to codecov.io
codecov -X gcov
# set error code
(exit $RETURN_CODE);
fi
# Have travis deploy tagged commits to PyPi
deploy:
provider: pypi
user: hardbyte
password:
secure: oQ9XpEkcilkZgKp+rKvPb2J1GrZe2ZvtOq/IjzCpiA8NeWixl/ai3BkPrLbd8t1wNIFoGwx7IQ7zxWL79aPYeG6XrljEomv3g45NR6dkQewUH+dQFlnT75Rm96Ycxvme0w1+71vM4PqxIuzyXUrF2n7JjC0XCCxHdTuYmPGbxVO1fOsE5R5b9inAbpEUtJuWz5AIrDEZ0OgoQpLSC8fLwbymTThX3JZ5GBLpRScVvLazjIYfRkZxvCqQ4mp1UNTdoMzekxsvxOOcEW6+j3fQO+Q/8uvMksKP0RgT8HE69oeYOeVic4Q4wGqORw+ur4A56NvBqVKtizVLCzzEG9ZfoSDy7ryvGWGZykkh8HX0PFQAEykC3iYihHK8ZFz5bEqRMegTmuRYZwPsel61wVd5posxnQkGm0syIoJNKuuRc5sUK+E3GviYcT8NntdR+4WBrvpQAYa1ZHpVrfnQXyaDmGzOjwCRGPoIDJweEqGVmLycEC5aT8rX3/W9tie9iPnjmFJh4CwNMxDgVQRo80m6Gtlf/DQpA3mH39IvWGqd5fHdTPxYPs32EQSCsaYLJV5pM8xBNv6M2S/KriGnGZU0xT7MEr46da0LstKsK/U8O0yamjyugMvQoC3zQcKLrDzWFSBsT7/vG+AuV5SK8yzfEHugo7jkPQQ+NTw29xzk4dY=
on:
tags: true
skip_cleanup: true
- stage: documentation
name: "Sphinx Build"
python: "3.7"
before_install:
- travis_retry pip install -r doc/doc-requirements.txt
script:
# Build the docs with Sphinx
# -a Write all files
# -n nitpicky
- python -m sphinx -an doc build
- stage: deploy
name: "PyPi Deployment"
python: "3.7"
deploy:
provider: pypi
user: hardbyte
password:
secure: oQ9XpEkcilkZgKp+rKvPb2J1GrZe2ZvtOq/IjzCpiA8NeWixl/ai3BkPrLbd8t1wNIFoGwx7IQ7zxWL79aPYeG6XrljEomv3g45NR6dkQewUH+dQFlnT75Rm96Ycxvme0w1+71vM4PqxIuzyXUrF2n7JjC0XCCxHdTuYmPGbxVO1fOsE5R5b9inAbpEUtJuWz5AIrDEZ0OgoQpLSC8fLwbymTThX3JZ5GBLpRScVvLazjIYfRkZxvCqQ4mp1UNTdoMzekxsvxOOcEW6+j3fQO+Q/8uvMksKP0RgT8HE69oeYOeVic4Q4wGqORw+ur4A56NvBqVKtizVLCzzEG9ZfoSDy7ryvGWGZykkh8HX0PFQAEykC3iYihHK8ZFz5bEqRMegTmuRYZwPsel61wVd5posxnQkGm0syIoJNKuuRc5sUK+E3GviYcT8NntdR+4WBrvpQAYa1ZHpVrfnQXyaDmGzOjwCRGPoIDJweEqGVmLycEC5aT8rX3/W9tie9iPnjmFJh4CwNMxDgVQRo80m6Gtlf/DQpA3mH39IvWGqd5fHdTPxYPs32EQSCsaYLJV5pM8xBNv6M2S/KriGnGZU0xT7MEr46da0LstKsK/U8O0yamjyugMvQoC3zQcKLrDzWFSBsT7/vG+AuV5SK8yzfEHugo7jkPQQ+NTw29xzk4dY=
on:
# Have travis deploy tagged commits to PyPi
tags: true
skip_cleanup: true
2 changes: 1 addition & 1 deletion can/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import logging

__version__ = "3.2.0-a1"
__version__ = "3.2.0b0"

log = logging.getLogger('can')

Expand Down

0 comments on commit c42b687

Please sign in to comment.