Skip to content

Commit d313808

Browse files
committed
CI: re-enable miniconda cache
1 parent 61f6f63 commit d313808

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

ci/install_travis.sh

+16-10
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,26 @@ home_dir=$(pwd)
3333
echo "[home_dir: $home_dir]"
3434

3535
# install miniconda
36-
echo "[Using clean Miniconda install]"
37-
3836
MINICONDA_DIR="$HOME/miniconda3"
39-
if [ -d "$MINICONDA_DIR" ]; then
40-
rm -rf "$MINICONDA_DIR"
41-
fi
4237

43-
# install miniconda
44-
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
45-
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh || exit 1
38+
if [ "$USE_CACHE" ] && [ -d "$MINICONDA_DIR" ]; then
39+
echo "[Using cached Miniconda install]"
40+
4641
else
47-
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh || exit 1
42+
echo "[Using clean Miniconda install]"
43+
44+
if [ -d "$MINICONDA_DIR" ]; then
45+
rm -rf "$MINICONDA_DIR"
46+
fi
47+
48+
# install miniconda
49+
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
50+
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh || exit 1
51+
else
52+
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh || exit 1
53+
fi
54+
bash miniconda.sh -b -p "$MINICONDA_DIR" || exit 1
4855
fi
49-
bash miniconda.sh -b -p "$MINICONDA_DIR" || exit 1
5056

5157
echo "[update conda]"
5258
conda config --set ssl_verify false || exit 1

0 commit comments

Comments
 (0)