forked from dragonfly/dragonfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
75 lines (67 loc) · 2.17 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
74
75
language: python
os:
- linux
python:
- "3.5"
- "3.6"
env:
- DIRECT_STATE=-direct OPT_STATE=-optimal
- DIRECT_STATE=direct OPT_STATE=-optimal
osx-setup-steps: &osx-setup-steps
os: osx
language: generic # 'language: python' is not yet supported on macOS
before_install:
- brew update
- brew outdated pyenv || brew upgrade pyenv
- brew unlink pyenv
- brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/922f1a6709446cb1c6cfb954651275bf4033eef8/Formula/pyenv.rb
- if [[ "$DIRECT_STATE" == "direct" ]]; then
brew ls --versions gcc && brew upgrade gcc || brew install gcc ;
fi
- brew install pyenv-virtualenv
- eval "$(pyenv init -)"
- eval "$(pyenv virtualenv-init -)"
- pyenv install $PYTHON
- export PYENV_VERSION=$PYTHON
- export PATH="/Users/travis/.pyenv/shims:${PATH}"
- pyenv virtualenv venv
- pyenv activate venv
- python --version
# We have to be explicit with the OSX versions because Python is not supported by default.
# The Python versions then have to be explicitly labelled with full version numbers because
# that is what pyenv uses for the installs. The extra "python" label to fix the display in the UI.
matrix:
include:
- python: 3.5
env: PYTHON=3.5.6 DIRECT_STATE=direct OPT_STATE=-optimal
<<: *osx-setup-steps
- python: 3.5
env: PYTHON=3.5.6 DIRECT_STATE=-direct OPT_STATE=-optimal
<<: *osx-setup-steps
- python: 3.6
env: PYTHON=3.6.8 DIRECT_STATE=direct OPT_STATE=-optimal
<<: *osx-setup-steps
- python: 3.6
env: PYTHON=3.6.8 DIRECT_STATE=-direct OPT_STATE=-optimal
<<: *osx-setup-steps
notifications:
email: false
before_cache:
- brew cleanup
cache:
pip: true
directories:
- $HOME/Library/Caches/Homebrew
- $HOME/.pyenv_cache
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$DIRECT_STATE" == "direct" ]]; then
sudo apt-get install -y -qq python-dev gfortran build-essential ;
fi
install:
- pip install -U pip
- pip install numpy==1.16.1 cython
- pip install -r requirements-dev.txt
- pip install -e . -v
script:
- bash run_all_tests.sh sanity $DIRECT_STATE
- bash run_all_tests.sh