Add retries to commands that download from external servers.

This helps reduce the chance of a build failure due to transient
download error.  This also switches to consistent use of wget
throughout, which reports download errors more cleanly in the travis
build logs.
This commit is contained in:
Jim Paris 2014-07-05 15:18:00 -04:00
parent 4242182588
commit 6d7464a422

View File

@ -2,16 +2,16 @@ notifications:
email: false email: false
language: c #NOTE: this will set CC=gcc which might cause trouble language: c #NOTE: this will set CC=gcc which might cause trouble
before_script: before_script:
- WGET="travis_retry wget --continue --tries=20 --waitretry=10 --retry-connrefused --no-dns-cache --timeout 300"
- sudo apt-get -qq update - sudo apt-get -qq update
## Install msp430 toolchain ## Install msp430 toolchain
- sudo apt-get -qq install lib32z1 - sudo apt-get -qq install lib32z1
- curl -s - $WGET http://adamdunkels.github.io/contiki-fork/mspgcc-4.7.0-compiled.tar.bz2 &&
http://adamdunkels.github.io/contiki-fork/mspgcc-4.7.0-compiled.tar.bz2 tar xjf mspgcc*.tar.bz2 -C /tmp/ &&
| tar xjf - -C /tmp/ && sudo cp -f -r /tmp/msp430/* /usr/local/ &&
sudo cp -f -r /tmp/msp430/* /usr/local/ && rm -rf /tmp/msp430 mspgcc*.tar.bz2 &&
rm -rf /tmp/msp430 && msp430-gcc --version
msp430-gcc --version
## Install avr toolchain ## Install avr toolchain
- sudo apt-get -qq install gcc-avr avr-libc - sudo apt-get -qq install gcc-avr avr-libc
@ -22,26 +22,24 @@ before_script:
## Install toolchain for mc1233x, cc2538 and mbxxx in care-free way ## Install toolchain for mc1233x, cc2538 and mbxxx in care-free way
- if [ ${BUILD_ARCH:-0} = arm ] ; then - if [ ${BUILD_ARCH:-0} = arm ] ; then
curl -s $WGET https://raw.githubusercontent.com/wiki/malvira/libmc1322x/files/arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 &&
https://raw.githubusercontent.com/wiki/malvira/libmc1322x/files/arm-2008q3-66-arm-none-eabi-i686-pc-linux-gnu.tar.bz2 tar xjf arm-2008q3*.tar.bz2 -C /tmp/ &&
| tar xjf - -C /tmp/ &&
sudo cp -f -r /tmp/arm-2008q3/* /usr/ && sudo cp -f -r /tmp/arm-2008q3/* /usr/ &&
rm -rf /tmp/arm-2008q3 && rm -rf /tmp/arm-2008q3 arm-2008q3*.tar.bz2 &&
arm-none-eabi-gcc --version ; arm-none-eabi-gcc --version ;
fi fi
## Install RL78 GCC toolchain ## Install RL78 GCC toolchain
- sudo apt-get install libncurses5:i386 zlib1g:i386 - sudo apt-get install libncurses5:i386 zlib1g:i386
- wget http://adamdunkels.github.io/contiki-fork/gnurl78-v13.02-elf_1-2_i386.deb && - $WGET http://adamdunkels.github.io/contiki-fork/gnurl78-v13.02-elf_1-2_i386.deb &&
sudo dpkg -i gnurl78*.deb sudo dpkg -i gnurl78*.deb
## Install SDCC from a purpose-built bundle ## Install SDCC from a purpose-built bundle
- if [ ${BUILD_ARCH:-0} = 8051 ] ; then - if [ ${BUILD_ARCH:-0} = 8051 ] ; then
curl -s $WGET https://raw.githubusercontent.com/wiki/g-oikonomou/contiki-sensinode/files/sdcc.tar.gz &&
https://raw.githubusercontent.com/wiki/g-oikonomou/contiki-sensinode/files/sdcc.tar.gz tar xzf sdcc.tar.gz -C /tmp/ &&
| tar xzf - -C /tmp/ &&
sudo cp -f -r /tmp/sdcc/* /usr/local/ && sudo cp -f -r /tmp/sdcc/* /usr/local/ &&
rm -rf /tmp/sdcc && rm -rf /tmp/sdcc sdcc.tar.gz &&
sdcc --version && sdcc --version &&
sudo apt-get -qq install srecord ; sudo apt-get -qq install srecord ;
fi fi