-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
130 lines (119 loc) · 5.2 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
122
123
124
125
126
127
128
129
130
# Derived from https://github.com/theochem/qcgrids/blob/master/.travis.yml
env:
matrix:
- MYCONDAPY=2.7
- MYCONDAPY=3.6
- MYCONDAPY=3.7
####
# EVERYTHING BELOW THIS LINE WILL BE COPIED INTO OTHER YMLs
####
# Do not use Travis Python to save some time.
language: generic
os:
- linux
- osx
osx_image: xcode6.4
dist: trusty
sudo: false
matrix:
# We only test on Linux with one specific Python version, unless we make a release. All
# other cases are allowed to fail and will exit early. With the fast_finish option,
# travis will send a status update to github as soon as the non-allowed-to-fail has
# finished. This speeds up testing in PRs.
#
# This is not ideal. It would be better to run just one item from the build matrix when
# not preparing a release. This is not possible on Travis. There are several tickets on
# travis-ci related to this limitation.
#
# https://github.com/travis-ci/travis-ci/issues/7451
# https://github.com/travis-ci/travis-ci/issues/7149
# https://github.com/travis-ci/travis-ci/issues/2778
# ...
fast_finish: true
allow_failures:
- os: osx
cache:
directories:
- $HOME/download
- $HOME/miniconda
before_cache:
- if [[ ! $TRAVIS_TAG ]]; then rm -rf $HOME/miniconda/conda-bld; fi
- rm -rf $HOME/miniconda/locks $HOME/miniconda/pkgs $HOME/miniconda/var $HOME/miniconda/conda-meta/history
branches:
only:
- master
- /^v[0-9]+\.[0-9]+(\.[0-9]+)?([abc][0-9]*)?$/ # release branches
before_install:
# 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 [ "${MYCONDAPY}" = "2.7" ]; then
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;
else
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/download/miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O $HOME/download/miniconda.sh;
fi;
fi;
bash $HOME/download/miniconda.sh -b -p $HOME/miniconda;
fi
install:
- source $HOME/miniconda/etc/profile.d/conda.sh
- conda activate
# Configure conda and get a few essentials
- conda config --set always_yes yes
# Show conda info for debugging
- conda install -q conda conda-build=3.16
- conda config --add channels insilichem
- if [[ $MYCONDAPY = 2.7 ]]; then
conda config --add channels omnia;
conda config --add channels egilliesix;
fi;
- conda info -a
- conda list
# Dependencies
- travis_wait conda build --python=${MYCONDAPY} devtools/conda-recipe
- if [[ $TRAVIS_TAG ]]; then
conda install -q anaconda-client;
anaconda -t $ANACONDA_TOKEN upload -u insilichem $HOME/miniconda/conda-bld/**/esigen-*.tar.bz2;
fi;
before_deploy:
- conda install constructor;
- conda remove --force constructor;
- pip install -U --no-deps https://github.com/jaimergp/constructor/archive/jinja-env.zip;
- constructor .
deploy:
# Deploy to PyPI
- provider: pypi
username: jaimergp
skip_cleanup: true
password:
secure: y1Nx6o9/B0CAGKq6uLCmfo3DGKcse42nmZ+NjGhhxf6eLGlv9jv4H6THoPJXKheEPUxB8F4cE93W6NanA9re6Kbnctxx7PSuiS2hoo7csGx4ekU4m4NUU3BEqYoAc6O/YradRCaCsWiFpUr94k9OoEDkisVfqDpXN0hgvB+UF3lMk9w/GXrGSAlW+t0yNvKsMW3STnUNSLxmtEtfrR9OgERrNFjiUgDiQ0YPxheV2lDupTlGxdQm9/0VaRrrdtM2GcH23/PR95WKMo7j17YND875GH2oFd5hhSQWp2pgpnowLLkKIssXl42rMSpCFsiCF9PZyB3wq0r6m5gtHD/1SvlWdtbcfk1RDUfTzM1/zPD9cWrWiWzwCvPzUuzcwYT5VgTN5lXMZERREi8SZICnDNGSWxm8osk7tTj4kI7DOWsftZNQ2WVV5llUn4rKkAJhslgdi0eM0rBAKl/KKm/YB8an1IVGFS6aJ339SuviWJ65LCKsIChwUZEVGoDq2WcKpXxZRmu9HpsXaaX/P8oEPw09ZVhOd0hAzFh7B0CvETxqC02XmWhXgVotXx6t1xDqpbEsCI7TdRP94QxWZZfo4RK/DueSM7a1WWAJTXydygdFSjQ7X+GLcC9+xUm91UKYZ3J25jDyLvjN1YdW7PNd8a6F6GN/T8GhUe7munz3C/I=
on:
tags: true
condition: "$MYCONDAPY = 3.7 && $TRAVIS_OS_NAME = linux"
#Deploy to GitHub releases
- provider: releases
api_key:
secure: R91DAiTQpGyiWCZ9FeqCVuCxk244cK67D4ojDtjCxdBGpZ4btH15PCnMpxQM9yAJ9hF6Jk3oLAeEjZW+VAiWJ+S8E4P0E7drBHQgevUcXmwxe2/1F/mvaDFAdAb6s9d59x90jhmItKq4kcNJ/GzV3VhnsvFoJIcWf5ldcjerRsBYV5ChQAJUWSzObbGLqQaPOuRCSXHtcm7WYP/7IfBq6YphXgeSmEEdcgpU+x4ZGInZZOYVejadV7xOjcQCkhnpitX2lWj00WkPAs8NlSoRwygfmwr26yesUvg2P0vqTjj7LI5+HY4I7TNhjgGZdSp+6t4gG6/l7OzxaUyn6KLiFoqOXc9M87Pl/YL19Pu7jQM0c4lcnGRmcZOiyL4BpJH7ugWka3naLUyKirImhEle5ESoxRyflYLaRS21a71RgSSMX8tyX0YbtaP2o/iI6+tqHrDaIP11Ql2sq3/JMRbIFwNsYsqAYXLSnwRSR4HzEOlhZEYs44D6B/2YVWjtwNgbNs/yJi0LN4bZFky67JnA9DGwzWqfrEvJbwP02poJTiAX5V20SZmwJeczWtujBDWPzphUFQstpM9J7KsJ7qrieDxgpgV7aETRyFes99emkEZbwICtMIQQxff5f/UnLVzgghcZ5bynRJN1XjktgNq1CjJWjUhs/nRzlHvAWDf3XbI=
file_glob: true
file: esigen**.sh
name: ESIgen ${TRAVIS_TAG}
body: ${TRAVIS_COMMIT_MESSAGE}
draft: false
prerelease: false
skip_cleanup: true
on:
tags: true
repo: insilichem/esigen
condition: $MYCONDAPY =~ (^2\.7)|(^3\.7)