[travis-ci] add some logic to try to cache a downloaded toolchain

This commit is contained in:
Travis Geiselbrecht
2015-09-18 20:27:05 -07:00
parent 2a7965262c
commit 70c1b1ac92
2 changed files with 10 additions and 2 deletions

View File

@@ -9,6 +9,11 @@ env:
# run in a container
sudo: false
# try to cache the toolchain download
cache:
directories:
- archives
# notify a few irc channels
notifications:
irc:

View File

@@ -33,11 +33,14 @@ TOOLCHAIN_SUFFIX="tar.xz"
TOOLCHAIN_ADDRESS="$TOOLCHAIN_BASE_URL/$TOOLCHAIN.$TOOLCHAIN_SUFFIX"
mkdir -p archives
cd archives
echo "Downloading toolchain $TOOLCHAIN from $TOOLCHAIN_ADDRESS"
wget $TOOLCHAIN_ADDRESS -q
wget -v -N $TOOLCHAIN_ADDRESS || exit 1
cd ..
echo "Unpacking $TOOLCHAIN"
tar xf $TOOLCHAIN.$TOOLCHAIN_SUFFIX
tar xf archives/$TOOLCHAIN.$TOOLCHAIN_SUFFIX || exit 1
export PATH=`pwd`/$TOOLCHAIN/bin:$PATH
echo "Starting build '$PROJECT' with '$TOOLCHAIN'\n"