ci: update ccache and improve its support

Update ccache to 3.2.5
Set ccache size
Display ccache statistics for each build
Disable ccache for configure phase
Export ccache bin path
travis: remove ccache stats before saving cache
This commit is contained in:
Francisco Ferreira 2016-05-17 06:16:42 +01:00 committed by Lucas De Marchi
parent 736c162d21
commit a74a7e5dfe
3 changed files with 17 additions and 1 deletions

View File

@ -45,6 +45,9 @@ script:
- python Tools/autotest/param_metadata/param_parse.py
- Tools/scripts/build_ci.sh
before_cache:
- ccache -z
notifications:
webhooks:
urls:

View File

@ -28,6 +28,12 @@ if [ -z "$CI_BUILD_TARGET" ]; then
CI_BUILD_TARGET="sitl linux px4-v2"
fi
if [[ "$CI_BUILD_TARGET" == *"px4"* ]]; then
export CCACHE_MAXSIZE="1500M"
else
export CCACHE_MAXSIZE="500M"
fi
# special case for SITL testing in CI
if [ "$CI_BUILD_TARGET" = "sitltest" ]; then
echo "Installing pymavlink"
@ -64,6 +70,7 @@ for t in $CI_BUILD_TARGET; do
fi
make $t -j2
ccache -s && ccache -z
popd
done
@ -86,6 +93,8 @@ for t in $CI_BUILD_TARGET; do
$waf configure --board $t --enable-benchmarks --check-c-compiler="$c_compiler" --check-cxx-compiler="$cxx_compiler"
$waf clean
$waf -j2 all
ccache -s && ccache -z
if [[ $t == linux ]]; then
$waf check
fi

View File

@ -3,13 +3,16 @@
set -ex
# Disable ccache for the configure phase, it's not worth it
export CCACHE_DISABLE="true"
ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3"
ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2"
RPI_ROOT="master"
RPI_TARBALL="$RPI_ROOT.tar.gz"
CCACHE_ROOT="ccache-3.2.4"
CCACHE_ROOT="ccache-3.2.5"
CCACHE_TARBALL="$CCACHE_ROOT.tar.bz2"
mkdir -p $HOME/opt
@ -68,6 +71,7 @@ exportline="export PATH=$HOME/ccache"
exportline="${exportline}:$HOME/bin"
exportline="${exportline}:$HOME/opt/gcc-arm-none-eabi-4_9-2015q3/bin"
exportline="${exportline}:$HOME/opt/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin"
exportline="${exportline}:$HOME/opt/$CCACHE_ROOT"
exportline="${exportline}:\$PATH"
if grep -Fxq "$exportline" ~/.profile; then