ci: show more verbose ccache stats
...and inline function used only once
This commit is contained in:
1 file changed
+1
-2
@@ -116,7 +116,6 @@ if [ -z "$NO_WERROR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ccache --zero-stats
|
ccache --zero-stats
|
||||||
PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
|
|
||||||
|
|
||||||
# Folder where the build is done.
|
# Folder where the build is done.
|
||||||
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
|
BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build-$HOST}
|
||||||
@@ -147,7 +146,7 @@ cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target $GOAL || (
|
|||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|
||||||
bash -c "${PRINT_CCACHE_STATISTICS}"
|
ccache --version | head -n 1 && ccache --show-stats --verbose
|
||||||
hit_rate=$(ccache --show-stats | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
|
hit_rate=$(ccache --show-stats | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
|
||||||
if [ "${hit_rate%.*}" -lt 75 ]; then
|
if [ "${hit_rate%.*}" -lt 75 ]; then
|
||||||
echo "::notice title=low ccache hitrate::Ccache hit-rate in $CONTAINER_NAME was $hit_rate%"
|
echo "::notice title=low ccache hitrate::Ccache hit-rate in $CONTAINER_NAME was $hit_rate%"
|
||||||
|
|||||||
Reference in new issue
Block a user