diff --git a/gitlab/before_build.sh b/gitlab/before_build.sh index 90206d1dfc71816eed29ed4690bc86f1d86a3ea3..840ffbe9e775ac00a10d2a365ad59e4f52a6748f 100755 --- a/gitlab/before_build.sh +++ b/gitlab/before_build.sh @@ -15,7 +15,17 @@ if [ ! -d ${PREFIX} ]; then log_info "Creating virtualenv installation at ${PREFIX}..." run_cmd ${BOB_PREFIX_PATH}/bin/virtualenv --system-site-packages ${PREFIX} else - log_warn "Prefix directory ${PREFIX} exists, not re-installing..." + log_info "Prefix directory ${PREFIX} exists, not re-installing..." +fi + +# Configures CCACHE +use_ccache=`which ccache` +if [ -z "${use_ccache}" ]; then + log_warn "Cannot find ccache, compiling from scratch..." +else + log_info "ccache installed at ${use_ccache}, caching compilations..." + run_cmd ln -s ${use_cacche} ${PREFIX}/bin/gcc + run_cmd ln -s ${use_cacche} ${PREFIX}/bin/g++ fi # Source the newly created virtualenv