Pbuilder ccache fixes (#1878)

* Pbuilder ccache fixes
This commit is contained in:
proller 2018-02-08 19:41:30 +03:00 committed by GitHub
parent 953ab16cde
commit 41ad692cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 9 deletions

View File

@ -57,7 +57,7 @@ matrix:
packages: [ pbuilder, fakeroot, debhelper ]
env:
- MATRIX_EVAL="export CC=clang-5.0 && export CXX=clang++-5.0"
- MATRIX_EVAL="export DEB_CC=clang-5.0 && export DEB_CXX=clang++-5.0"
script:
- utils/travis/pbuilder.sh
@ -98,7 +98,7 @@ matrix:
# packages: [ pbuilder, fakeroot, debhelper ]
#
# env:
# - MATRIX_EVAL="export CC=clang-6.0 && export CXX=clang++-6.0 && export DIST=bionic && export EXTRAPACKAGES=clang-6.0"
# - MATRIX_EVAL="export DEB_CC=clang-6.0 && export DEB_CXX=clang++-6.0 && export DIST=bionic && export EXTRAPACKAGES=clang-6.0"
#
# script:
# - utils/travis/pbuilder.sh

View File

@ -0,0 +1 @@
Compiler-7.0.0

View File

@ -1,9 +1,15 @@
#!/bin/sh
if [ -n "$CCACHEDIR" ]; then
mkdir -p $CCACHEDIR || true
chown -R $BUILDUSERID:$BUILDUSERID $CCACHEDIR || true
chmod -R a+rwx $CCACHEDIR || true
# CCACHEDIR - for pbuilder ; CCACHE_DIR - for ccache
echo "CCACHEDIR=$CCACHEDIR CCACHE_DIR=$CCACHE_DIR SET_CCACHEDIR=$SET_CCACHEDIR"
[ -z "$CCACHE_DIR" ] && export CCACHE_DIR=${CCACHEDIR:=${SET_CCACHEDIR:=/var/cache/pbuilder/ccache}}
if [ -n "$CCACHE_DIR" ]; then
mkdir -p $CCACHE_DIR || true
chown -R $BUILDUSERID:$BUILDUSERID $CCACHE_DIR || true
chmod -R a+rwx $CCACHE_DIR || true
fi
ccache --show-stats

View File

@ -20,7 +20,7 @@ date
mkdir -p build
cd build
cmake .. -DCMAKE_CXX_COMPILER=`which $CXX` -DCMAKE_C_COMPILER=`which $CC` \
cmake .. -DCMAKE_CXX_COMPILER=`which $DEB_CXX $CXX` -DCMAKE_C_COMPILER=`which $DEB_CC $CC` \
`# Does not optimize to speedup build, skip debug info to use less disk` \
-DCMAKE_C_FLAGS_ADD="-O0 -g0" -DCMAKE_CXX_FLAGS_ADD="-O0 -g0" \
`# ignore ccache disabler on trusty` \

View File

@ -18,8 +18,8 @@ env TEST_RUN=${TEST_RUN=1} \
`# travisci will not upload ccache cache after timeout (48min), use our less timeout` \
PBUILDER_OPT="--timeout 35m $PBUILDER_OPT" \
`# clang faster than gcc` \
DEB_CC=$CC DEB_CXX=$CXX \
CCACHE_SIZE=${CCACHE_SIZE:=4G} CCACHEDIR=${CCACHEDIR:=$HOME/.ccache} \
DEB_CC=${DEB_CC=$CC} DEB_CXX=${DEB_CXX=$CXX} \
CCACHE_SIZE=${CCACHE_SIZE:=4G} SET_CCACHEDIR=${SET_CCACHEDIR:=$HOME/.ccache} \
`# Disable all features` \
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DUNBUNDLED=1 -DENABLE_UNWIND=0 -DENABLE_MYSQL=0 -DENABLE_CAPNP=0 -DENABLE_RDKAFKA=0 -DUSE_EMBEDDED_COMPILER=0 -DCMAKE_C_FLAGS_ADD='-O0 -g0' -DCMAKE_CXX_FLAGS_ADD='-O0 -g0' $CMAKE_FLAGS" \
`# Use all possible contrib libs from system` \