-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.travis.yml
121 lines (102 loc) · 3.25 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
120
121
dist: xenial
sudo: false
language: python
branches:
only:
- master
env:
global:
- ORGNAME="omnia"
- USERNAME="mobleylab"
- PKG_NAME="blues"
- RELEASE=true
#- RELEASE=false
- CONDA_ENV="${PKG_NAME}-${TRAVIS_OS_NAME}"
- OE_LICENSE="$HOME/oe_license.txt"
matrix:
include:
# Extra includes for OSX since python language is not available by default on OSX
#- os: osx
# language: generic
# env:
# - CONDA_PY="35"
# - PYTHON_VER="3.5"
#- os: osx
# language: generic
# env:
# - CONDA_PY="36"
# - PYTHON_VER="3.6"
#- os: osx
# language: generic
# env:
# - CONDA_PY="37"
# - PYTHON_VER="3.7"
- os: linux
python: 3.5
env:
- CONDA_PY="35"
- PYTHON_VER="3.5"
- os: linux
python: 3.6
env:
- CONDA_PY="36"
- PYTHON_VER="3.6"
- os: linux
python: 3.7
env:
- CONDA_PY="37"
- PYTHON_VER="3.7"
before_install:
# Additional info about the build
- uname -a
# Install the Python environment
- source devtools/travis-ci/before_install.sh
- python -V
# Unpack encrypted OpenEye license file
- if [ "$TRAVIS_SECURE_ENV_VARS" == true ]; openssl aes-256-cbc -K $encrypted_935501d0d612_key -iv $encrypted_935501d0d612_iv -in oe_license.txt.enc -out oe_license.txt -d; fi
- if [ "$TRAVIS_SECURE_ENV_VARS" == false ]; then echo "OpenEye license will not be installed in forks."; fi
- conda update --yes -q conda
# Turn on always yes
- conda config --set always_yes true --set changeps1 no
- conda config --set anaconda_upload no
# Add org channel
- conda config --add channels omnia
# Add conda-forge channel to top priority
- conda config --add channels conda-forge
install:
# Create test environment for package
- echo ${PYTHON_VER} ${CONDA_PY}
- conda create -n ${CONDA_ENV} python=${PYTHON_VER} pip pytest pytest-cov conda-verify
- conda activate ${CONDA_ENV}
# Install pip only modules
- pip install codecov
# Install OpenEye dependencies
# Use beta version for partial bond orders
- conda install -c openeye/label/beta openeye-toolkits && python -c "import openeye; print(openeye.__version__)"
- conda install -q -c openeye/label/Orion -c omnia oeommtools packmol
- conda info oeommtools
- conda info numexpr=2.6.6
# Build and install package
- conda build -q --python=${PYTHON_VER} devtools/conda-recipe
- conda info blues
- conda install --use-local -q ${PKG_NAME}
- conda list
script:
- pytest -v -s --cov=blues blues/tests/
after_success:
- codecov
- test $TRAVIS_BRANCH = "master" && conda install conda-build && conda install anaconda-client && chmod +x ./devtools/conda-recipe/conda_upload.sh
before_deploy:
# Set up git user name and tag this commit
#- git config --local user.name ${USERNAME}
#- git config --local user.email ${USERNAME}@gmail.com
- export CONDA_BLD_FILE=`conda build --python=${PYTHON_VER} devtools/conda-recipe --output`
#- git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
deploy:
#Deploy to Anaconda.org
- provider: script
skip_cleanup: true
script: ./devtools/conda-recipe/conda_upload.sh
on:
branch: master
# tags: true