-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
120 lines (109 loc) · 3.84 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
env:
matrix:
- MYCONDAPY=2.7
# Do not use Travis Python to save some time.
language: generic
sudo: false
matrix:
fast_finish: true
include:
- os: linux
dist: trusty # ubuntu 14.04
env: LINUX_DIST=trusty
- os: linux
dist: xenial # ubuntu 16.04
env: LINUX_DIST=xenial
- os: osx
osx_image: xcode7.3 # macOS 10.11
env: OSX_DIST=capitan
- os: osx
osx_image: xcode8.3 # macOS 10.12
env: OSX_DIST=sierra
- os: osx
osx_image: xcode9.4 # macOS 10.13
env: OSX_DIST=highsierra
cache:
directories:
- $HOME/miniconda
- $HOME/chimera
before_cache:
- conda deactivate || true
- conda env remove -n pychimera
- if [[ ! $TRAVIS_TAG ]]; then rm -rf $HOME/miniconda/conda-bld/*; fi
branches:
only:
- master
- /^v?[0-9]+\.[0-9]+(\.[0-9]+)?([abc][0-9]*)?$/ # release branches
before_install:
# Check if UCSF Chimera is present and install it if needed
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
if [[ ! -e $HOME/chimera/bin/chimera ]]; then
bash scripts/install_chimera.sh;
fi;
export CHIMERADIR="$HOME/chimera";
else
sw_vers;
if [[ ! -e $HOME/chimera/Chimera.app/Contents/Resources/bin/chimera ]]; then
bash scripts/install_chimera.sh;
fi;
export CHIMERADIR="$HOME/chimera/Chimera.app/Contents/Resources";
fi
# Get miniconda. Take the right version, so re-installing python is hopefully not needed.
- if test -e $HOME/miniconda/bin; then
echo "miniconda already installed.";
else
echo "Installing miniconda.";
rm -rf $HOME/miniconda;
mkdir -p $HOME/download;
if [[ -d $HOME/download/miniconda.sh ]]; then rm -rf $HOME/download/miniconda.sh; fi;
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O $HOME/download/miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O $HOME/download/miniconda.sh;
fi;
bash $HOME/download/miniconda.sh -b -p $HOME/miniconda;
fi
# Configure conda and get a few essentials
- source $HOME/miniconda/etc/profile.d/conda.sh
- conda config --set always_yes yes
- conda config --remove-key channels || true
- conda config --add channels defaults
- conda activate base
- conda install -q -n base conda conda-build
# Show conda info for debugging
- conda info -a
- conda list
- env | sort
install:
# Dependencies
- conda build -q --python=2.7 conda-recipe
# Create specific Python 2 env
- conda env remove -n pychimera || true
- conda create -n pychimera --use-local python=2.7 pychimera pytest
script:
- conda activate pychimera
- cd tests
- pytest
- python pychimeratest.py pychimera_test*
- cd ..
- conda deactivate
before_deploy:
- conda activate
- conda install -q anaconda-client
deploy:
# Deploy to Anaconda.org
- provider: script
script: anaconda -t $ANACONDA_TOKEN upload -u insilichem $HOME/miniconda/conda-bld/**/pychimera-*.tar.bz2;
skip_cleanup: true
on:
tags: true
condition: "($OSX_DIST = sierra) || ($LINUX_DIST = xenial)"
# Deploy to PyPI
- provider: pypi
username: jaimergp
skip_cleanup: true
password:
secure: rLTkUZshTVFYbZ79EREfLcl9jwwE0Yy8lmSnmRkka077zs86yaClw+sEKaDdINyjKasC0+9DA2qMKNEHvewKDHfIarA9/ZLfcyTWusiiJrAMF5oqomfQV9gy0Ofso6YDggzzuEbRhCVNeS2BeWczbJ4esUCRTdx+2hIMhcqe6whEHK9nw/M4IvNqoo4vyjS/2H1yOBXstfvRx6NKBFVa8FyLcLE0UDRMAmHg0WGmDgu7ch3H3jyx5tG8dodvoCyVYKMm1aHLvUyHmHnrcw4/zjZhUeeIVY0lMIVDNwQ+5LuceAASEdMGrfkdZWuQOjjUosHUJMs6apIbQ+L8fXyBiPJ2VZ/TAm4RqSSfwfACMoaCLxszIc3yP/kXnKjmvqFdpTVumUuI+kqkd0gk1Ai4HxUZK9unybtIoWtUwT36h4+AFLQw/mL5ekuOQ2MgRA9g/n1f3iwG9T+lEaSoQxq4O7o5DViazi/Y+4gaHYwKGvF78ZrQuzwh2TZZQnbBoafCpyqQGLtYZNvemEwplPf4lEnxI30MXAvpLx8YoF/ooqNoUu90JjgDSSWnfaqXh5E4xhlvYoW3duNzCd1J13ebbiU6rEH8Pw7pDEJrByfSpZp4wisyuyPV3oaygy8d0Md7Ad7lYxurjP1+qHi1lDVLyMFQCa40I9GY5C766hRJZ0Y=
on:
tags: true
condition: "$LINUX_DIST = trusty"