forked from fatiando/fatiando
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
80 lines (66 loc) · 2.48 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
76
77
78
79
80
language: generic
sudo: false
notifications:
email: false
# Only build pushes from the master branch. PRs are always built. The master
# build will also push the newly built docs to fatiando.org/dev
branches:
only:
- master
# Need to fetch a deeper clone because the default depth Travis uses (50) isn't
# enough to get the git tags so versioneer can't find the correct version
# number.
git:
depth: 100
os:
- linux
env:
global:
# Encrypted Github API key for pushing the built docs to the fatiando/dev repo
- secure: cXRXecOJ0LpQBPfl/CvrrvuDTQpN0zZ1mpGG4rs02yWRmRoykqzJpPNHBHZ1MWEHGwOP9QqXjuPTRPEHYBP4I9V/7uHgrd4rIg50gonyr0LdQFLL9QxsM6SMH/zHyma+hpWmg2k3ad6zBd0GFkaACtVlS/x2F8JG+W6TrU/oL+I=
- BUILD_DOCS=true
- UPDATE_WEBSITE=false
- MAYAVI=false
- COVERAGE=false
# Build under all combinations of the of the following
matrix:
- PYTHON=2.7 UPDATE_WEBSITE=true
- PYTHON=3.5
- PYTHON=3.6
matrix:
# Add special build configurations
include:
- env: PYTHON=2.7 MAYAVI=true BUILD_DOCS=false
# Only submit coverage to coveralls once
- env: PYTHON=2.7 COVERAGE=true BUILD_DOCS=false
allow_failures:
# Still testing Python 3 support so allow these builds to fail
- env: PYTHON=3.6
- env: PYTHON=3.5
before_install:
# Get Miniconda from Continuum
# Need to source the script to set the PATH variable in this environment
# (not the scripts environment)
- source ci/install-miniconda.sh
- cp ci/matplotlibrc .
# Create a conda env to install required libraries
- conda update --yes conda
- conda create -n testenv --yes pip python=$PYTHON
- source activate testenv
install:
- if [ "$MAYAVI" == "true" ]; then conda install --yes mayavi -c conda-forge; fi
- conda install --yes --file ci/requirements.txt -c conda-forge
- conda install -y basemap
- if [ "$COVERAGE" == "true" ]; then pip install coveralls==0.5; fi
# Show installed pkg information for postmortem diagnostic
- conda list
# Package Fatiando and install
- python setup.py sdist --formats=gztar
- pip install dist/fatiando-*.tar.gz
script:
- if [ "$COVERAGE" == "true" ]; then make coverage; else make test; fi
- make pep8
- if [ "$BUILD_DOCS" == "true" ]; then make -C doc; fi
after_success:
- if [ "$COVERAGE" == "true" ]; then coveralls; fi
- if [ "$UPDATE_WEBSITE" == "true" ]; then bash ci/update-website.sh; fi