Skip to content

Commit c42b687

Browse files
committed
Use travis stages instead of matrix (hardbyte#577)
1 parent f087770 commit c42b687

File tree

2 files changed

+70
-61
lines changed

2 files changed

+70
-61
lines changed

.travis.yml

Lines changed: 69 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
language: python
22

3+
# Linux setup
4+
dist: xenial
5+
6+
cache:
7+
directories:
8+
- "$HOME/.cache/pip"
9+
310
python:
411
# CPython; versions pre-2.7 and 3.0-3.5 have reached EOL
512
- "2.7"
@@ -10,81 +17,83 @@ python:
1017
# PyPy:
1118
- pypy # Python 2.7
1219
- pypy3.5 # Python 3.5
20+
- pypy3
1321

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

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

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

28-
# Linux setup
29-
dist: xenial
29+
script:
30+
- |
31+
# Run the tests
32+
python setup.py test
33+
# preserve the error code
34+
RETURN_CODE=$?
35+
# Upload the coverage to codecov.io
36+
codecov -X gcov
37+
# set error code
38+
(exit $RETURN_CODE);
39+
40+
41+
jobs:
42+
allow_failures:
43+
# we allow all dev & nightly builds to fail, since these python versions might
44+
# still be very unstable
45+
- python: 3.8-dev
46+
- python: nightly
3047

31-
matrix:
3248
include:
33-
# building the docs
34-
- python: "3.7"
35-
env: BUILD_ONLY_DOCS=TRUE
49+
# Note no matrix support when using stages.
50+
# Stages with the same name get run in parallel.
51+
# Jobs within a stage can also be named.
52+
53+
# Unit Testing Stage
54+
3655
# testing socketcan on Trusty & Python 3.6, since it is not available on Xenial
37-
- os: linux
56+
- stage: test
57+
name: Socketcan
58+
os: linux
3859
dist: trusty
3960
python: "3.6"
4061
sudo: required
4162
env: TEST_SOCKETCAN=TRUE
42-
# testing on macOS; see "os: ..." above
43-
- os: osx
63+
64+
# testing on OSX
65+
- stage: test
66+
os: osx
4467
osx_image: xcode8.3
4568
python: 3.6-dev
46-
- os: osx
69+
- stage: test
70+
os: osx
4771
osx_image: xcode8.3
4872
python: 3.7-dev
49-
- os: osx
73+
- stage: test
74+
os: osx
5075
osx_image: xcode8.3
5176
python: nightly
5277

53-
allow_failures:
54-
# we allow all dev & nighly builds to fail, since these python versions might
55-
# still be very unstable
56-
- python: 3.8-dev
57-
- python: nightly
58-
59-
install:
60-
- if [[ "$TEST_SOCKETCAN" ]]; then sudo bash test/open_vcan.sh ; fi
61-
- if [[ "$BUILD_ONLY_DOCS" ]]; then travis_retry pip install -r doc/doc-requirements.txt; fi
62-
- travis_retry pip install .[test]
63-
64-
script:
65-
- |
66-
if [[ "$BUILD_ONLY_DOCS" ]]; then
67-
# Build the docs with Sphinx
68-
# -a Write all files
69-
# -n nitpicky
70-
python -m sphinx -an doc build
71-
else
72-
# Run the tests
73-
python setup.py test
74-
# preserve the error code
75-
RETURN_CODE=$?
76-
# Upload the coverage to codecov.io
77-
codecov -X gcov
78-
# set error code
79-
(exit $RETURN_CODE);
80-
fi
81-
82-
# Have travis deploy tagged commits to PyPi
83-
deploy:
84-
provider: pypi
85-
user: hardbyte
86-
password:
87-
secure: oQ9XpEkcilkZgKp+rKvPb2J1GrZe2ZvtOq/IjzCpiA8NeWixl/ai3BkPrLbd8t1wNIFoGwx7IQ7zxWL79aPYeG6XrljEomv3g45NR6dkQewUH+dQFlnT75Rm96Ycxvme0w1+71vM4PqxIuzyXUrF2n7JjC0XCCxHdTuYmPGbxVO1fOsE5R5b9inAbpEUtJuWz5AIrDEZ0OgoQpLSC8fLwbymTThX3JZ5GBLpRScVvLazjIYfRkZxvCqQ4mp1UNTdoMzekxsvxOOcEW6+j3fQO+Q/8uvMksKP0RgT8HE69oeYOeVic4Q4wGqORw+ur4A56NvBqVKtizVLCzzEG9ZfoSDy7ryvGWGZykkh8HX0PFQAEykC3iYihHK8ZFz5bEqRMegTmuRYZwPsel61wVd5posxnQkGm0syIoJNKuuRc5sUK+E3GviYcT8NntdR+4WBrvpQAYa1ZHpVrfnQXyaDmGzOjwCRGPoIDJweEqGVmLycEC5aT8rX3/W9tie9iPnjmFJh4CwNMxDgVQRo80m6Gtlf/DQpA3mH39IvWGqd5fHdTPxYPs32EQSCsaYLJV5pM8xBNv6M2S/KriGnGZU0xT7MEr46da0LstKsK/U8O0yamjyugMvQoC3zQcKLrDzWFSBsT7/vG+AuV5SK8yzfEHugo7jkPQQ+NTw29xzk4dY=
88-
on:
89-
tags: true
90-
skip_cleanup: true
78+
- stage: documentation
79+
name: "Sphinx Build"
80+
python: "3.7"
81+
before_install:
82+
- travis_retry pip install -r doc/doc-requirements.txt
83+
script:
84+
# Build the docs with Sphinx
85+
# -a Write all files
86+
# -n nitpicky
87+
- python -m sphinx -an doc build
88+
- stage: deploy
89+
name: "PyPi Deployment"
90+
python: "3.7"
91+
deploy:
92+
provider: pypi
93+
user: hardbyte
94+
password:
95+
secure: oQ9XpEkcilkZgKp+rKvPb2J1GrZe2ZvtOq/IjzCpiA8NeWixl/ai3BkPrLbd8t1wNIFoGwx7IQ7zxWL79aPYeG6XrljEomv3g45NR6dkQewUH+dQFlnT75Rm96Ycxvme0w1+71vM4PqxIuzyXUrF2n7JjC0XCCxHdTuYmPGbxVO1fOsE5R5b9inAbpEUtJuWz5AIrDEZ0OgoQpLSC8fLwbymTThX3JZ5GBLpRScVvLazjIYfRkZxvCqQ4mp1UNTdoMzekxsvxOOcEW6+j3fQO+Q/8uvMksKP0RgT8HE69oeYOeVic4Q4wGqORw+ur4A56NvBqVKtizVLCzzEG9ZfoSDy7ryvGWGZykkh8HX0PFQAEykC3iYihHK8ZFz5bEqRMegTmuRYZwPsel61wVd5posxnQkGm0syIoJNKuuRc5sUK+E3GviYcT8NntdR+4WBrvpQAYa1ZHpVrfnQXyaDmGzOjwCRGPoIDJweEqGVmLycEC5aT8rX3/W9tie9iPnjmFJh4CwNMxDgVQRo80m6Gtlf/DQpA3mH39IvWGqd5fHdTPxYPs32EQSCsaYLJV5pM8xBNv6M2S/KriGnGZU0xT7MEr46da0LstKsK/U8O0yamjyugMvQoC3zQcKLrDzWFSBsT7/vG+AuV5SK8yzfEHugo7jkPQQ+NTw29xzk4dY=
96+
on:
97+
# Have travis deploy tagged commits to PyPi
98+
tags: true
99+
skip_cleanup: true

can/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import logging
1010

11-
__version__ = "3.2.0-a1"
11+
__version__ = "3.2.0b0"
1212

1313
log = logging.getLogger('can')
1414

0 commit comments

Comments
 (0)