Skip to content

Commit fad2876

Browse files
author
MarcoFalke
committed
ci: Always print low ccache hit rate notice
1 parent f7e0c3d commit fad2876

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

ci/test/03_test_script.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,9 @@ cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target $GOAL || (
148148
)
149149

150150
bash -c "${PRINT_CCACHE_STATISTICS}"
151-
if [ "$CI" = "true" ]; then
152-
hit_rate=$(ccache -s | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
153-
if [ "${hit_rate%.*}" -lt 75 ]; then
154-
echo "::notice title=low ccache hitrate::Ccache hit-rate in $CONTAINER_NAME was $hit_rate%"
155-
fi
151+
hit_rate=$(ccache --show-stats | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
152+
if [ "${hit_rate%.*}" -lt 75 ]; then
153+
echo "::notice title=low ccache hitrate::Ccache hit-rate in $CONTAINER_NAME was $hit_rate%"
156154
fi
157155
du -sh "${DEPENDS_DIR}"/*/
158156
du -sh "${PREVIOUS_RELEASES_DIR}"

0 commit comments

Comments
 (0)