travis: osx: retry brew update

Fixes #2347

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2019-07-31 20:49:08 +03:00
parent c5c248c098
commit 3bdcaba39f
3 changed files with 18 additions and 12 deletions
+3 -2
View File
@@ -3,13 +3,15 @@
set -x
set -e
scriptdir="$(dirname $0)"
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
ulimit -a
sudo sysctl -w kern.maxproc=2048
sudo sysctl -w kern.maxprocperuid=2048
echo '\nulimit -u 2048' >> ~/.bash_profile
ulimit -a
brew update
$scriptdir/retry.sh brew update
brew upgrade pyenv
# NOTE: used to install and run our style checking tools
osx_python_ver=3.6.2
@@ -47,7 +49,6 @@ if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
ssh 0.0.0.0 ls &> /dev/null
fi
scriptdir="$(dirname $0)"
echo > env.sh
if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]
+4 -10
View File
@@ -3,20 +3,14 @@
set -x
set -e
N_RETRIES=3
function retry {
for i in $(seq $N_RETRIES); do
$@ && break
done
}
scriptdir="$(dirname $0)"
# NOTE: it is not uncommon for pip to hang on travis for what seems to be
# networking issues. Thus, let's retry a few times to see if it will eventially
# work or not.
retry pip install --upgrade pip setuptools wheel
retry pip install .[all,tests]
retry pip install psutil
$scriptdir/retry.sh pip install --upgrade pip setuptools wheel
$scriptdir/retry.sh pip install .[all,tests]
$scriptdir/retry.sh pip install psutil
git config --global user.email "[email protected]"
git config --global user.name "DVC Tester"
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
set -e
N_RETRIES=3
for i in $(seq $N_RETRIES); do
echo "Attempt #$i"
$@ && exit $?
done
exit $?