From fc42d462165d02b4c965aa1723c51164f1ee08fc Mon Sep 17 00:00:00 2001 From: Stefan Behnel <stefan_ml@behnel.de> Date: Sun, 12 Aug 2018 15:10:01 +0200 Subject: [PATCH] Also retry "apt-get update" in travis if "apt-get install" fails, because that was probably the reason. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfdfc5fd2..501e18f91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -115,8 +115,7 @@ before_install: if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then # adding apt repos in travis is really fragile => retry a couple of times. for i in {1..10}; do sudo apt-add-repository --yes 'ppa:ubuntu-toolchain-r/test' && break; sleep 2; done - for i in {1..10}; do sudo apt-get update && break; sleep 2; done - for i in {1..10}; do sudo apt-get install gcc-8 $(if [ "$BACKEND" = cpp ]; then echo -n "g++-8"; fi ) && break; sleep 2; done + for i in {1..10}; do sudo apt-get update && sudo apt-get install --yes gcc-8 $(if [ "$BACKEND" = cpp ]; then echo -n "g++-8"; fi ) && break; sleep 2; done sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 $(if [ "$BACKEND" = cpp ]; then echo " --slave /usr/bin/g++ g++ /usr/bin/g++-8"; fi) sudo update-alternatives --set gcc /usr/bin/gcc-8 export CC=gcc-8 -- 2.30.9