-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (65 loc) · 1.54 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
os: linux
dist: xenial
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
- /Users/travis/.pyenv/
before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
# Credit https://discourse.brew.sh/t/best-practice-for-homebrew-on-travis-brew-update-is-5min-to-build-time/5215/9
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
addons:
apt:
packages:
- g++
- cmake
- libjsoncpp-dev
update: true
homebrew:
packages:
- jsoncpp
- pyenv
- pyenv-virtualenv
language: python
python:
- "3.5"
- "3.6"
- "3.7"
env: COVERAGE=1
# Workaround to install Python on OS X, based on https://gist.github.com/Bouke/11261620
matrix:
include:
- name: "Python: 3.5"
os: osx
osx_image: xcode11
language: generic
env: PYTHON=3.5.5 COVERAGE=1
update: true
- name: "Python: 3.6"
os: osx
osx_image: xcode11
language: generic
env: PYTHON=3.6.5 COVERAGE=1
update: true
- name: "Python: 3.7"
os: osx
osx_image: xcode11
language: generic
env: PYTHON=3.7.3 COVERAGE=1
update: true
before_install: |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
# pyenv install --list
pyenv install --skip-existing $PYTHON
export PYENV_VERSION=$PYTHON
export PATH="/Users/travis/.pyenv/shims:${PATH}"
python --version
fi
install:
- make venv
- pip install codecov
script:
- make test
- codecov