forked from fatiando/verde
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (108 loc) · 5.14 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Configuration file for TravisCI
# We use miniconda for Python so don't need any Python specific tools
language: generic
# Use the container builds so we don't need sudo priviledges
sudo: false
# Only build pushes to the master branch and tags. This avoids the double
# builds than happen when working on a branch instead of a fork.
branches:
only:
- master
# Regex to build tagged commits with version numbers
- /\d+\.\d+(\.\d+)?(\S*)?$/
# Define environment variables common to all builds
env:
global:
# Encrypted variables
# Github Token for pushing the built HTML (GH_TOKEN)
- secure: "Y8ulfXO+hO9MnChNNkwciZQ7qaj3N3sGhAPe69QPrJxxge8c4BUpQHtNrBZB4aMqxVGMfQQ7SVC4qB64WMEYYbCuD/NUaerS6wLzMXkYcS42xyA/qv7TUSJyjbvqnEz6DV92VyPaQGM6GAk+sY8b1lXoR3v+W2Ee7zxb3Z3fGkiK5gp14kjRlc66xSFr1ShnenlG766vS+NC5oeIGBMEtHNb7XcQNbXGliS1+iFi6eYxeJLa13DQhmyjUVSVSAHyNFvyTb+J5fWHii9cCxO+3GUvt3Geb/AP5wpjbr+V6EYc8Mi86/oMdq+PexsbzayggKQ0HPABvsDrpAHbiPa+TnnRv9MI5oemkzIWdDU/JCBFt0sR4JO3VyyEyXAfdK3Zp+eQvbeXmSYITlYP90fC7iDuz2YYnwyH84LYcMA9lJNAXdBEa4qrrOCawem8l77d7X/dCgiFzzWjwHKgRXyHQZrKN+rWnuVP7X1RhzAjOBkH1uVqevmyqI9Te2X0oM/vRBMk727YX3HeItgVUlvj9kAFI43sSMlN1+WNVyYSV7vjZ2pKNCaJadwwVn67Os8GGGtcQrdosF9fBGGTPcAzGYoGlyxT3u76weoNer/YpYyRW8d4kwyjEIddFEbyaLprnuGe1mMrxaYISoBV69SXzZXKJyaoBaTeRQD5JZeR9Nk="
# PyPI password for deploying releases (TWINE_PASSWORD)
- secure: "Gvd2kH5bGIng7Wz3R4Md5d48qU0vYo0Sb4g7A1UAn8EOuWAcbkdSAq5yDiAp4pENeGceHQG0+jX+GQBZoSOMUpwAfhPkWG5HBIc+P/G+iTUyF2oELLCekcGgccPzwNgQt574FzM0PkC9L4hINNRjVtnFa+SIx72D2r1OdTvmk2+c4jXBZl52e4l5dU+Hjzwh22KNzAMtXDVuvr3NVdJZHA/ldTwEBUQfiLo2CGkgls6o8ZLixK0tCRGIFKlZko9WeBTzQYidloSo3EQx0eqiTz7qydm3UfCezA9UYPefGOtUaA/4ysqs8tgG8xrnx8NhhRqH9pfPAhgsCMwfmtibslNwH+C7gtbERT8lLY5NfU1xyDC4UxkjbwbzKQno/vPhiqEJ/uR458IdZbzUeWXlt+Rz+Dyj1lW7FqPLOl3Zpfgfv1swWqxjVwduV46c3nlgu9fEkAiEH2SzAtBlsQ2qwbJCZKXj+8Ps9FmaqvQ+SCOTAycgR9WnYoIIutpn0cs3k8zqqQyBq2zXJLkPHflVich8wKKaOsaFMCIKLWaOODCw5fLkfxck/QtlolGGFi3lh5W5p4Zxxr7KdL8f+UrkAb6gY9LStvqwe2rSG2olqc95+zozsMY/YHXTIG092WB3EmptwO9jL67D3AIVBKOdvcRYFetWMyY61ZmEK0s/43I="
- TWINE_USERNAME=Leonardo.Uieda
# The file with the listed requirements to be installed by conda
- CONDA_REQUIREMENTS=requirements.txt
- CONDA_REQUIREMENTS_DEV=requirements-dev.txt
- CONDA_INSTALL_EXTRA="codecov"
# These variables control which actions are performed in a build
- DEPLOY_DOCS=false
- DEPLOY_PYPI=false
# Specify the build configurations. Be sure to only deploy from a single build.
matrix:
include:
- name: "Linux - Python 3.7"
os: linux
env:
- PYTHON=3.7
# Main build to deploy to PyPI and Github pages
- name: "Linux - Python 3.6 (deploy)"
os: linux
env:
- PYTHON=3.6
- DEPLOY_DOCS=true
- DEPLOY_PYPI=true
- CONDA_INSTALL_EXTRA="codecov twine"
# Check tests pass when using optional dependencies.
- name: "Linux - Python 3.7 (optional deps)"
os: linux
env:
- PYTHON=3.7
- CONDA_INSTALL_EXTRA="codecov pykdtree numba"
- name: "Linux - Python 3.6 (optional deps)"
os: linux
env:
- PYTHON=3.6
- CONDA_INSTALL_EXTRA="codecov pykdtree numba"
# Setup the build environment
before_install:
# Copy sample data to the verde data dir to avoid downloading all the time
- mkdir -p $HOME/.verde/data/master
- cp -r data/* $HOME/.verde/data/master
# Get the Fatiando CI scripts
- git clone --branch=1.2.0 --depth=1 https://github.com/fatiando/continuous-integration.git
# Download and install miniconda and setup dependencies
# Need to source the script to set the PATH variable globaly
- source continuous-integration/travis/setup-miniconda.sh
# Show installed pkg information for postmortem diagnostic
- conda list
# Install the package that we want to test
install:
# Make a binary wheel for our package and install it
- python setup.py bdist_wheel
- pip install dist/*
# Run the actual tests and checks
script:
# Run the test suite
- make test
# Build the documentation
- make -C doc clean all
# Things to do if the build is successful
after_success:
# Upload coverage information
- coverage xml
- echo "Uploading coverage to Codecov"
- codecov -e PYTHON
# Deploy
deploy:
# Make a release on PyPI
- provider: script
script: continuous-integration/travis/deploy-pypi.sh
on:
tags: true
condition: '$DEPLOY_PYPI == "true"'
# Push the built HTML in doc/_build/html to the gh-pages branch
- provider: script
script: continuous-integration/travis/deploy-gh-pages.sh
skip_cleanup: true
on:
branch: master
condition: '$DEPLOY_DOCS == "true"'
# Push HTML when building tags as well
- provider: script
script: continuous-integration/travis/deploy-gh-pages.sh
skip_cleanup: true
on:
tags: true
condition: '$DEPLOY_DOCS == "true"'
# Don't send out emails every time a build fails
notifications:
email: false