Skip to content

Commit

Permalink
Merge a50e373 into 9c0bc80
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkinsc committed Feb 8, 2019
2 parents 9c0bc80 + a50e373 commit 21fd929
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions travis/install-tools.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e -o pipefail
#set -e -o pipefail

CONDA_CHANNEL_STRING="--override-channels -c broad-viral -c conda-forge -c bioconda -c defaults"
CONDA_ENV="$(pwd)/tools/conda-tools/default"
Expand All @@ -13,15 +13,23 @@ export CONDA_ENVS_PATH=tools/conda-cache:tools/conda-tools/default
PYVER=`echo $TRAVIS_PYTHON_VERSION | cut -c 1`

if [ ! -d $CONDA_ENV ]; then
conda create -y -m --quiet -p $CONDA_ENV python="$TRAVIS_PYTHON_VERSION"
conda create -y -m --quiet -p $CONDA_ENV python="$TRAVIS_PYTHON_VERSION" || exit $?
fi

conda install -y --quiet \
$CONDA_CHANNEL_STRING \
--file requirements-conda.txt \
--file requirements-conda-tests.txt \
--file requirements-py$PYVER.txt \
-p $CONDA_ENV
RETRIES=0
RETRY_LIMIT=3
until conda install -y --quiet \
$CONDA_CHANNEL_STRING \
--file requirements-conda.txt \
--file requirements-conda-tests.txt \
--file requirements-py$PYVER.txt \
-p $CONDA_ENV; do
let RETRIES++
if [ "$RETRIES" -gt "$RETRY_LIMIT" ]; then
break
fi
echo "Conda install failed, likely due to transient server errors. Retrying (${RETRIES}/${RETRY_LIMIT})..."
done

conda clean --all --yes # clean temp/cache files to reduce Travis cache size

Expand Down

0 comments on commit 21fd929

Please sign in to comment.