mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
travis: osx: retry brew update
Fixes #2347 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -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
@@ -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"
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
N_RETRIES=3
|
||||
for i in $(seq $N_RETRIES); do
|
||||
echo "Attempt #$i"
|
||||
$@ && exit $?
|
||||
done
|
||||
|
||||
exit $?
|
||||
Reference in New Issue
Block a user