forked from fatiando/harmonica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
112 lines (101 loc) · 4.83 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
# 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: "Xr1Zc6Zu/AyqvDaiSv7Omr6nX67Onfffk8wL5XseREh9IH3iTWcBtM5lU7JyM87czOX1s3tux1+c/2xX7CdP4W8e+EK5npKV53bbC96tl66up5JMP5mzGucatfTfRZ5bJc8MwXiAIUM3LX+8XU/tIAw56c1T0eiNmqdazBuRXsshFUMoIpIQqM7rnhOk3j//VICjZrXiz5MqNUOmVQmvGxdZyW/jgstemD4Vhw4Oh8/kr6cgXSBltFQIc07jVfywd/noNEC1X2V+R7teE+6PUKpINomPKYlLYN2+T21BdrfIkVnHEOZhnr3eft7190+naIuWB9W1V1EbVI9/2OGkFkMUvyZHBN6VaKLQbbrtzmJNt0cgQRqRXWj+XlYtJfGDxGTc020w5oafU7SxXPkcFj1x1304S59pOoVuRemaVT9zwl/Q0mbYH04WxufC6arJCnegT14OUdumw0dXaZ3Zadrb7z8OhI+Pc2AqE3LAgKrcGq2fqjEGzLVRibYwX3vbkIHgVK1RORI6+oInEXLdOc7imH/13HV0wG0VJ6gNkDtdMmmPouDb7fEby6om7yjyQ1rSqTlZT6wv40KRiXyqHA9Lx8BxK1LHB13+sZWigcnrNni834vgzeS5agoFdeOOGBB/8n7f/z98eKu3Bfk3XQLXZjW2FTeTzxovzvhNzA4="
# PyPI password for deploying releases (TWINE_PASSWORD)
- secure: "ufJKNS+JGD3klJglfML+4gerCOntHlfLX8M1zb3wyf6QbOfqZncvijh5ChVSAsqMeqKJG+hHVUgRN0pPgOyhsCetgeS/QdYsehEZO+UZeni+xdaAZgG/pz0pzxDuIOOTu9CImKIn+hnMSo3cnoO9fASem1c77XvLHs6BcShYpUZTRElvDGcvWlU2aZMA2qO9rVBpRBgr8GK6uLdXqV6yzJznWlQVRSJmpVEVfdNr5cbtgy7gxf2IBL2TXEWzzqwcJc3/bkzGFCwqgJ3aouIeHeWuNJEW23BjfIj6Da7ibsC7cPwS0u96MbBTBNOVInlh6Zy7xQvJpzgYBPTE3P3+HMUF7wS6HVkGyn86kh0JMfTwUjSul9SxGDCSn1JWnH5Ya7S5rGekYPcxE+2gKAt3BHjPM8xIDo6fIPH8zWLXl7xQJDHe/TWc3GRUD2OB+y9fWy+xvuXz7DI41oSHMSAEw6Ob2x7dGPbiSGvWmK0Z6Nm1sBVP/3xGhfhuH48587cbVEU27MAIUCzyJYi2750z3LP5pDP4HGiJsiH/kZLTBTgjxKM0m6+A/quAlARUsiXyf5z9fAqed13EcB/0x8YqqGVHNC79+7eIhEWwPU1h1+NeiTqK2wznzvawdfDtFHtquLC0pqWNq+r76walp+wBG0+jGpK+D/orUoW/x0oVrGo="
- TWINE_USERNAME=Leonardo.Uieda
- HARMONICA_DATA_DIR="$HOME/.harmonica/data"
# The files 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.8"
os: linux
env:
- PYTHON=3.8
- 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
# Setup the build environment
before_install:
# Copy sample data to the verde data dir to avoid downloading all the time
- mkdir -p $HARMONICA_DATA_DIR/master
- cp -r data/* $HARMONICA_DATA_DIR/master
# Get the Fatiando CI scripts
- git clone --branch=1.1.1 --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