Skip to content

Commit 01157ed

Browse files
committed
cache packages
1 parent 1c12261 commit 01157ed

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.travis.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ sudo: required
44

55
dist: precise
66

7+
cache:
8+
directories:
9+
- $HOME/miniconda
10+
11+
# Removing the directory will remove the env but leave the cached packages
12+
# at $HOME/miniconda/pkgs. That is a win-win because when re-creating the
13+
# env we will download only the new packages.
14+
before_cache:
15+
- rm -rf $HOME/miniconda/envs/TEST
16+
717
services:
818
- mysql
919
- postgresql
@@ -50,8 +60,15 @@ before_script:
5060
- ./ci-helpers/travis/freetds.sh
5161

5262
before_install:
53-
- wget http://bit.ly/miniconda -O miniconda.sh
54-
- bash miniconda.sh -b -p $HOME/miniconda
63+
- |
64+
URL="http://bit.ly/miniconda"
65+
echo ""
66+
if [ ! -f $HOME/miniconda/bin/conda ] ; then
67+
echo "Fresh miniconda installation."
68+
wget $URL -O miniconda.sh
69+
rm -rf $HOME/miniconda
70+
bash miniconda.sh -b -p $HOME/miniconda
71+
fi
5572
- export PATH="$HOME/miniconda/bin:$PATH"
5673
- conda update --yes --all
5774
- conda config --add channels odm2 --force

0 commit comments

Comments
 (0)