This repository has been archived by the owner on Jun 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
98 lines (87 loc) · 4.41 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
# Configuration file for TravisCI
# We use miniconda for Python so don't need any Python specific tools
language: generic
os: linux
dist: xenial
# 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*)?$/
# Store datasets between builds to avoid downloading every time the tests are run
cache:
directories:
- $HOME/.rockhound/data
# Define environment variables common to all builds
env:
global:
# Encrypted variables
# Github Token for pushing the built HTML (GH_TOKEN)
- secure: "qhS44nXEK7L9RQg/2D00wOzhZzbNXhJ3FpRtMiNe3P49kjhgLBRlr3xBWk8mHv/+UTTjJr61M99L7yFDTjBamKxP1uhZC5tx7W2Li6Vm+TamASucTRX9QF8qvMgHA9vK/YXd+LnS4WuGWGcJv2XYWeExJ0skjuGa890saI7CtrWu4pf6ULucA7fjN5fvOh2RDixV8NssDGT/35VPdBDvczkcb+CDBuVu8y14nFRpFWDLGc6hnM180pGb7i7863qsgPJQcM8JFhQoRqzq7TARMP/mto3YInBG1zktHCtl6+fWBCteD8eYBGnKEQqcDkUiOq9n9t3ebz0xMd8Okh8vyyCHwd9V/9pzqq8wEBdMoIleUAUKUPaq1UNAx8Q72k451MN8wOnt3ONJGa8nVtA0TPvThSSNek95tayxPu7k8IrJJrXrgRLrlLJw2aza3++a6hcaftR5TpWREv3aEAGxH2Dk2Df71OEEOycCF+7F7/AP3zIpoo1kAfGJ3zg1NIJr3/sDiXJG3QKx3tunPDHR/6uQXYl5B2whzUigvs31OF8KFcy0gWWOklP5iipWz9wvmUyQyDfKx+nPjCjfc1zgzZHg5kTvkTjZli/Ja9fJLf3Q18HQfF97PzvKbDEDylg7g6fq7oypMGqjN8oQ9s2BIGKFRMkq1X5wjNOJm1P7ZpA="
# PyPI password for deploying releases (TWINE_PASSWORD)
- secure: "UPbOTWqOAdXK13FzlkV7wDF1Mw4/hTmsl7lxbFLF6fx7UcNlTom3vDqoWMVRd9R5mMQDl2sHYhd9mVBd4Ax5VG+c5hO0uAfEjP6ITI5dSH9cp2xqo5rRO2D/3AkgEbjRNxzZ+f+vw4TEBzKYG8NYUj4ChFBwAwOofXq0n064NiuC7bCo/z66eGJIsQHPhOvoLIDIN7yoxfSf7jNqnCD/uBuFzsn/xL3xwdECIWEdfkfTCo5M5dvbNnQwraNqape/JR/b91r9XuuTnMZDsmVwCBfGxzUsOFUWMMyo+V+D6oU7VVo5H0CfcBYG1VRtPxEMreKXUFdWbdEsWwPhg9XJwBypA/PC9P8Zf/DJ4hnjBKdVTnrb1tCUrxVy39xsYNohqY/GHPEvkS59LRy7Nwpu2MEoO1EHD6J3MeQZYHRs/+H7RTDyfCwBKsHfmLK5hkCl/5ACOPJUuiDuqFa9mMfWVXZPAKpUtUN1bTuzSJTutG9+ysf5D6TQLWep1NRdMLgX7ZjsZuUPwANhz3w9VgxXcRAL5gf0U0i1a4qy6rU4tx/US2pM8L51cEZRmRxdTd7+9cuzfbjH8TUcsqPNiH8FcWf71t6wnqkXbkl5vueGztxJg7iOwk3RfDqOwovyYkadCFYOB9A9tB4VW95m2QvtOKY3I50swU1sVJmMg6C4vjY="
- TWINE_USERNAME=Leonardo.Uieda
# The files with the listed requirements to be installed by conda
- CONDA_REQUIREMENTS=requirements.txt
- CONDA_REQUIREMENTS_DEV=requirements-dev.txt
# 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.
jobs:
include:
# 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
# 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 a minimal test
- make minimal_test
# Build the documentation (without running the examples)
- make -C doc clean all
# 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