ci: use updated version of ccache

This commit is contained in:
Francisco Ferreira 2016-04-16 08:26:23 +01:00 committed by Lucas De Marchi
parent b5faf9c361
commit 95343255e1
1 changed files with 28 additions and 13 deletions

View File

@ -9,21 +9,36 @@ ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
RPI_ROOT="master" RPI_ROOT="master"
RPI_TARBALL="$RPI_ROOT.tar.gz" RPI_TARBALL="$RPI_ROOT.tar.gz"
CCACHE_ROOT="ccache-3.2.4"
CCACHE_TARBALL="$CCACHE_ROOT.tar.bz2"
mkdir -p $HOME/opt mkdir -p $HOME/opt
pushd $HOME/opt pushd $HOME
# PX4 toolchain # PX4 toolchain
compiler=$ARM_ROOT dir=$ARM_ROOT
if [ ! -d "$HOME/opt/$compiler" ]; then if [ ! -d "$HOME/opt/$dir" ]; then
wget http://firmware.ardupilot.org/Tools/PX4-tools/$ARM_TARBALL wget http://firmware.ardupilot.org/Tools/PX4-tools/$ARM_TARBALL
tar -xf $ARM_TARBALL tar -xf $ARM_TARBALL -C opt
fi fi
# RPi/BBB toolchain # RPi/BBB toolchain
compiler="tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64" dir="tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64"
if [ ! -d "$HOME/opt/$compiler" ]; then if [ ! -d "$HOME/opt/$dir" ]; then
wget http://firmware.ardupilot.org/Tools/Travis/NavIO/$RPI_TARBALL wget http://firmware.ardupilot.org/Tools/Travis/NavIO/$RPI_TARBALL
tar -xf $RPI_TARBALL $compiler tar -xf $RPI_TARBALL -C opt $dir
fi
# CCache
dir=$CCACHE_ROOT
if [ ! -d "$HOME/opt/$dir" ]; then
wget https://www.samba.org/ftp/ccache/$CCACHE_TARBALL
tar -xf $CCACHE_TARBALL
pushd $CCACHE_ROOT
./configure --prefix="/tmp" --bindir="$HOME/opt/$dir"
make
make install
popd
fi fi
popd popd
@ -40,12 +55,12 @@ ln -s /usr/bin/llvm-ar-3.7 ~/bin/llvm-ar
mkdir -p $HOME/ccache mkdir -p $HOME/ccache
# configure ccache # configure ccache
ln -s /usr/bin/ccache ~/ccache/g++ ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/g++
ln -s /usr/bin/ccache ~/ccache/gcc ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/gcc
ln -s /usr/bin/ccache ~/ccache/arm-none-eabi-g++ ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-none-eabi-g++
ln -s /usr/bin/ccache ~/ccache/arm-none-eabi-gcc ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-none-eabi-gcc
ln -s /usr/bin/ccache ~/ccache/arm-linux-gnueabihf-g++ ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-gnueabihf-g++
ln -s /usr/bin/ccache ~/ccache/arm-linux-gnueabihf-gcc ln -s ~/opt/$CCACHE_ROOT/ccache ~/ccache/arm-linux-gnueabihf-gcc
exportline="export PATH=$HOME/ccache" exportline="export PATH=$HOME/ccache"
exportline="${exportline}:$HOME/bin" exportline="${exportline}:$HOME/bin"