-
Notifications
You must be signed in to change notification settings - Fork 55
/
.travis.yml
43 lines (40 loc) · 1.13 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# We need Python 3 for the tests, but, if we add Python 3 as a language, it will be
# installed in a virtualenv where bin/python points to Python 3.
# Then "python clang-format-diff" is spawned and this ends up using Python 2 instead
# of the required Python 2.7.
language: generic
os:
- linux
- osx
# On Ubuntu:
# - coreutils is for readlink.
# - Python 2.7 for clang-format-diff.
# - Python 3.4 for the actual tests.
before_install:
- >
if [ "$TRAVIS_OS_NAME" = osx ]; then \
brew update && \
brew upgrade python && \
brew install \
clang-format \
shellcheck \
&& \
sudo pip3 install pylint; \
else \
sudo apt-get update && \
sudo apt-get install -y \
clang-format-3.8 \
coreutils \
python2.7 \
python3-pip \
python3.5 \
shellcheck \
&& \
sudo pip3 install virtualenv && \
virtualenv --python=python3.5 venv-for-travis && \
. ./venv-for-travis/bin/activate && \
pip install pylint && \
deactivate; \
fi
script:
- ./run-checks