Skip to content

Commit ab116a7

Browse files
nparleyjreback
authored andcommitted
BUG: Travis building on container-based infrastructure
closes pandas-dev#10598 Author: Neil Parley <[email protected]> Closes pandas-dev#12946 from nparley/travis and squashes the following commits:
1 parent f42283d commit ab116a7

11 files changed

+283
-210
lines changed

.travis.yml

+146-53
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
1+
sudo: false
22
language: python
33

4-
env:
4+
# To turn off cached miniconda, cython files and compiler cache comment out the
5+
# USE_CACHE=true line for the build in the matrix below. To delete caches go to
6+
# https://travis-ci.org/OWNER/REPOSITORY/caches or run
7+
# travis cache --delete inside the project directory from the travis command line client
8+
# The cash directories will be deleted if anything in ci/ changes in a commit
9+
cache:
10+
directories:
11+
- $HOME/miniconda # miniconda cache
12+
- $HOME/.cache # cython cache
13+
- $HOME/.ccache # compiler cache
514

15+
env:
616
global:
717
# scatterci API key
818
#- secure: "Bx5umgo6WjuGY+5XFa004xjCiX/vq0CyMZ/ETzcs7EIBI1BE/0fIDXOoWhoxbY9HPfdPGlDnDgB9nGqr5wArO2s+BavyKBWg6osZ3dmkfuJPMOWeyCa92EeP+sfKw8e5HSU5MizW9e319wHWOF/xkzdHR7T67Qd5erhv91x4DnQ="
919
# ironcache API key
10-
- secure: "e4eEFn9nDQc3Xa5BWYkzfX37jaWVq89XidVX+rcCNEr5OlOImvveeXnF1IzbRXznH4Sv0YsLwUd8RGUWOmyCvkONq/VJeqCHWtTMyfaCIdqSyhIP9Odz8r9ahch+Y0XFepBey92AJHmlnTh+2GjCDgIiqq4fzglojnp56Vg1ojA="
11-
- secure: "CjmYmY5qEu3KrvMtel6zWFEtMq8ORBeS1S1odJHnjQpbwT1KY2YFZRVlLphfyDQXSz6svKUdeRrCNp65baBzs3DQNA8lIuXGIBYFeJxqVGtYAZZs6+TzBPfJJK798sGOj5RshrOJkFG2rdlWNuTq/XphI0JOrN3nPUkRrdQRpAw="
20+
#- secure: "e4eEFn9nDQc3Xa5BWYkzfX37jaWVq89XidVX+rcCNEr5OlOImvveeXnF1IzbRXznH4Sv0YsLwUd8RGUWOmyCvkONq/VJeqCHWtTMyfaCIdqSyhIP9Odz8r9ahch+Y0XFepBey92AJHmlnTh+2GjCDgIiqq4fzglojnp56Vg1ojA="
21+
#- secure: "CjmYmY5qEu3KrvMtel6zWFEtMq8ORBeS1S1odJHnjQpbwT1KY2YFZRVlLphfyDQXSz6svKUdeRrCNp65baBzs3DQNA8lIuXGIBYFeJxqVGtYAZZs6+TzBPfJJK798sGOj5RshrOJkFG2rdlWNuTq/XphI0JOrN3nPUkRrdQRpAw="
1222
# pandas-docs-bot GH
1323
- secure: "PCzUFR8CHmw9lH84p4ygnojdF7Z8U5h7YfY0RyT+5K/aiQ1ZTU3ZkDTPI0/rR5FVMxsEEKEQKMcc5fvqW0PeD7Q2wRmluloKgT9w4EVEJ1ppKf7lITPcvZR2QgVOvjv4AfDtibLHFNiaSjzoqyJVjM4igjOu8WTlF3JfZcmOQjQ="
1424

@@ -29,112 +39,194 @@ matrix:
2939
- BUILD_TYPE=conda
3040
- JOB_TAG=_OSX
3141
- TRAVIS_PYTHON_VERSION=3.5
42+
- CACHE_NAME="35_osx"
43+
- USE_CACHE=true
3244
- python: 2.7
3345
env:
34-
- JOB_NAME: "27_slow_nnet_LOCALE"
35-
- NOSE_ARGS="slow and not network and not disabled"
36-
- LOCALE_OVERRIDE="zh_CN.GB18030"
37-
- FULL_DEPS=true
38-
- JOB_TAG=_LOCALE
46+
- JOB_NAME: "27_slow_nnet_LOCALE"
47+
- NOSE_ARGS="slow and not network and not disabled"
48+
- LOCALE_OVERRIDE="zh_CN.UTF-8"
49+
- FULL_DEPS=true
50+
- JOB_TAG=_LOCALE
51+
- CACHE_NAME="27_slow_nnet_LOCALE"
52+
- USE_CACHE=true
53+
addons:
54+
apt:
55+
packages:
56+
- language-pack-zh-hans
3957
- python: 2.7
4058
env:
41-
- JOB_NAME: "27_nslow"
42-
- NOSE_ARGS="not slow and not disabled"
43-
- FULL_DEPS=true
44-
- CLIPBOARD_GUI=gtk2
45-
- LINT=true
59+
- JOB_NAME: "27_nslow"
60+
- NOSE_ARGS="not slow and not disabled"
61+
- FULL_DEPS=true
62+
- CLIPBOARD_GUI=gtk2
63+
- LINT=true
64+
- CACHE_NAME="27_nslow"
65+
- USE_CACHE=true
66+
addons:
67+
apt:
68+
packages:
69+
- python-gtk2
4670
- python: 3.4
4771
env:
48-
- JOB_NAME: "34_nslow"
49-
- NOSE_ARGS="not slow and not disabled"
50-
- FULL_DEPS=true
51-
- CLIPBOARD=xsel
72+
- JOB_NAME: "34_nslow"
73+
- NOSE_ARGS="not slow and not disabled"
74+
- FULL_DEPS=true
75+
- CLIPBOARD=xsel
76+
- CACHE_NAME="34_nslow"
77+
- USE_CACHE=true
78+
addons:
79+
apt:
80+
packages:
81+
- xsel
5282
- python: 3.5
5383
env:
54-
- JOB_NAME: "35_nslow"
55-
- NOSE_ARGS="not slow and not network and not disabled"
56-
- FULL_DEPS=true
57-
- CLIPBOARD=xsel
58-
- COVERAGE=true
84+
- JOB_NAME: "35_nslow"
85+
- NOSE_ARGS="not slow and not network and not disabled"
86+
- FULL_DEPS=true
87+
- CLIPBOARD=xsel
88+
- COVERAGE=true
89+
- CACHE_NAME="35_nslow"
90+
# - USE_CACHE=true # Don't use cache for 35_nslow
91+
addons:
92+
apt:
93+
packages:
94+
- xsel
95+
# In allow_failures
5996
- python: 2.7
6097
env:
61-
- JOB_NAME: "27_slow"
62-
- JOB_TAG=_SLOW
63-
- NOSE_ARGS="slow and not network and not disabled"
64-
- FULL_DEPS=true
98+
- JOB_NAME: "27_slow"
99+
- JOB_TAG=_SLOW
100+
- NOSE_ARGS="slow and not network and not disabled"
101+
- FULL_DEPS=true
102+
- CACHE_NAME="27_slow"
103+
- USE_CACHE=true
104+
# In allow_failures
65105
- python: 3.4
66106
env:
67-
- JOB_NAME: "34_slow"
68-
- JOB_TAG=_SLOW
69-
- NOSE_ARGS="slow and not network and not disabled"
70-
- FULL_DEPS=true
71-
- CLIPBOARD=xsel
107+
- JOB_NAME: "34_slow"
108+
- JOB_TAG=_SLOW
109+
- NOSE_ARGS="slow and not network and not disabled"
110+
- FULL_DEPS=true
111+
- CLIPBOARD=xsel
112+
- CACHE_NAME="34_slow"
113+
- USE_CACHE=true
114+
addons:
115+
apt:
116+
packages:
117+
- xsel
118+
# In allow_failures
72119
- python: 2.7
73120
env:
74-
- JOB_NAME: "27_build_test_conda"
75-
- JOB_TAG=_BUILD_TEST
76-
- NOSE_ARGS="not slow and not disabled"
77-
- FULL_DEPS=true
78-
- BUILD_TEST=true
121+
- JOB_NAME: "27_build_test_conda"
122+
- JOB_TAG=_BUILD_TEST
123+
- NOSE_ARGS="not slow and not disabled"
124+
- FULL_DEPS=true
125+
- BUILD_TEST=true
126+
- CACHE_NAME="27_build_test_conda"
127+
- USE_CACHE=true
128+
# In allow_failures
79129
- python: 3.5
80130
env:
81-
- JOB_NAME: "35_numpy_dev"
82-
- JOB_TAG=_NUMPY_DEV
83-
- NOSE_ARGS="not slow and not network and not disabled"
84-
- PANDAS_TESTING_MODE="deprecate"
131+
- JOB_NAME: "35_numpy_dev"
132+
- JOB_TAG=_NUMPY_DEV
133+
- NOSE_ARGS="not slow and not network and not disabled"
134+
- PANDAS_TESTING_MODE="deprecate"
135+
- CACHE_NAME="35_numpy_dev"
136+
- USE_CACHE=true
137+
addons:
138+
apt:
139+
packages:
140+
- libatlas-base-dev
141+
- gfortran
142+
# In allow_failures
85143
- python: 2.7
86144
env:
87-
- JOB_NAME: "27_nslow_nnet_COMPAT"
88-
- NOSE_ARGS="not slow and not network and not disabled"
89-
- LOCALE_OVERRIDE="it_IT.UTF-8"
90-
- INSTALL_TEST=true
91-
- JOB_TAG=_COMPAT
145+
- JOB_NAME: "27_nslow_nnet_COMPAT"
146+
- NOSE_ARGS="not slow and not network and not disabled"
147+
- LOCALE_OVERRIDE="it_IT.UTF-8"
148+
- INSTALL_TEST=true
149+
- JOB_TAG=_COMPAT
150+
- CACHE_NAME="27_nslow_nnet_COMPAT"
151+
- USE_CACHE=true
152+
addons:
153+
apt:
154+
packages:
155+
- language-pack-it
156+
# In allow_failures
92157
- python: 2.7
93158
env:
94-
- JOB_NAME: "doc_build"
95-
- FULL_DEPS=true
96-
- DOC_BUILD=true # if rst files were changed, build docs in parallel with tests
97-
- JOB_TAG=_DOC_BUILD
159+
- JOB_NAME: "doc_build"
160+
- FULL_DEPS=true
161+
- DOC_BUILD=true
162+
- JOB_TAG=_DOC_BUILD
163+
- CACHE_NAME="doc_build"
164+
- USE_CACHE=true
98165
allow_failures:
99166
- python: 2.7
100167
env:
101168
- JOB_NAME: "27_slow"
102169
- JOB_TAG=_SLOW
103170
- NOSE_ARGS="slow and not network and not disabled"
104171
- FULL_DEPS=true
172+
- CACHE_NAME="27_slow"
173+
- USE_CACHE=true
105174
- python: 3.4
106175
env:
107176
- JOB_NAME: "34_slow"
108177
- JOB_TAG=_SLOW
109178
- NOSE_ARGS="slow and not network and not disabled"
110179
- FULL_DEPS=true
111180
- CLIPBOARD=xsel
181+
- CACHE_NAME="34_slow"
182+
- USE_CACHE=true
183+
addons:
184+
apt:
185+
packages:
186+
- xsel
112187
- python: 2.7
113188
env:
114189
- JOB_NAME: "27_build_test_conda"
115190
- JOB_TAG=_BUILD_TEST
116191
- NOSE_ARGS="not slow and not disabled"
117192
- FULL_DEPS=true
118193
- BUILD_TEST=true
194+
- CACHE_NAME="27_build_test_conda"
195+
- USE_CACHE=true
119196
- python: 3.5
120197
env:
121198
- JOB_NAME: "35_numpy_dev"
122199
- JOB_TAG=_NUMPY_DEV
123200
- NOSE_ARGS="not slow and not network and not disabled"
124201
- PANDAS_TESTING_MODE="deprecate"
202+
- CACHE_NAME="35_numpy_dev"
203+
- USE_CACHE=true
204+
addons:
205+
apt:
206+
packages:
207+
- libatlas-base-dev
208+
- gfortran
125209
- python: 2.7
126210
env:
127211
- JOB_NAME: "27_nslow_nnet_COMPAT"
128212
- NOSE_ARGS="not slow and not network and not disabled"
129213
- LOCALE_OVERRIDE="it_IT.UTF-8"
130214
- INSTALL_TEST=true
131215
- JOB_TAG=_COMPAT
216+
- CACHE_NAME="27_nslow_nnet_COMPAT"
217+
- USE_CACHE=true
218+
addons:
219+
apt:
220+
packages:
221+
- language-pack-it
132222
- python: 2.7
133223
env:
134224
- JOB_NAME: "doc_build"
135225
- FULL_DEPS=true
136226
- DOC_BUILD=true
137227
- JOB_TAG=_DOC_BUILD
228+
- CACHE_NAME="doc_build"
229+
- USE_CACHE=true
138230

139231
before_install:
140232
- echo "before_install"
@@ -153,9 +245,10 @@ before_install:
153245

154246
install:
155247
- echo "install start"
156-
- ci/prep_ccache.sh
248+
- ci/check_cache.sh
249+
- ci/prep_cython_cache.sh
157250
- ci/install_travis.sh
158-
- ci/submit_ccache.sh
251+
- ci/submit_cython_cache.sh
159252
- echo "install done"
160253

161254
before_script:
@@ -175,6 +268,6 @@ after_success:
175268
after_script:
176269
- echo "after_script start"
177270
- ci/install_test.sh
178-
- source activate pandas && ci/print_versions.py
271+
- source activate pandas && python -c "import pandas; pandas.show_versions();"
179272
- ci/print_skipped.py /tmp/nosetests.xml
180273
- echo "after_script done"

ci/before_install_travis.sh

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ echo "inside $0"
99

1010
# overview
1111
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
12-
sudo apt-get update $APT_ARGS # run apt-get update for all versions
13-
1412
sh -e /etc/init.d/xvfb start
1513
fi
1614

ci/check_cache.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
if [ "$TRAVIS_PULL_REQUEST" == "false" ]
4+
then
5+
echo "Not a PR: checking for changes in ci/ from last 2 commits"
6+
git diff HEAD~2 --numstat | grep -E "ci/"
7+
ci_changes=$(git diff HEAD~2 --numstat | grep -E "ci/"| wc -l)
8+
else
9+
echo "PR: checking for changes in ci/ from last 2 commits"
10+
git fetch origin pull/${TRAVIS_PULL_REQUEST}/head:PR_HEAD
11+
git diff PR_HEAD~2 --numstat | grep -E "ci/"
12+
ci_changes=$(git diff PR_HEAD~2 --numstat | grep -E "ci/"| wc -l)
13+
fi
14+
15+
MINICONDA_DIR="$HOME/miniconda/"
16+
CACHE_DIR="$HOME/.cache/"
17+
CCACHE_DIR="$HOME/.ccache/"
18+
19+
if [ $ci_changes -ne 0 ]
20+
then
21+
echo "Files have changed in ci/ deleting all caches"
22+
rm -rf "$MINICONDA_DIR"
23+
rm -rf "$CACHE_DIR"
24+
rm -rf "$CCACHE_DIR"
25+
fi

ci/install-2.7_NUMPY_DEV.sh

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ pip uninstall numpy -y
1212
# these wheels don't play nice with the conda libgfortran / openblas
1313
# time conda install -n pandas libgfortran openblas || exit 1
1414

15-
time sudo apt-get $APT_ARGS install libatlas-base-dev gfortran
16-
1715
# install numpy wheel from master
1816
pip install --pre --upgrade --no-index --timeout=60 --trusted-host travis-dev-wheels.scipy.org -f http://travis-dev-wheels.scipy.org/ numpy
1917

ci/install-3.5_NUMPY_DEV.sh

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ pip uninstall numpy -y
1212
# these wheels don't play nice with the conda libgfortran / openblas
1313
# time conda install -n pandas libgfortran openblas || exit 1
1414

15-
time sudo apt-get $APT_ARGS install libatlas-base-dev gfortran
16-
1715
# install numpy wheel from master
1816
pip install --pre --upgrade --no-index --timeout=60 --trusted-host travis-dev-wheels.scipy.org -f http://travis-dev-wheels.scipy.org/ numpy scipy
1917

0 commit comments

Comments
 (0)