ci: Always print low ccache hit rate notice
What changed, and why it matters
This is a minor continuous integration (CI) script change. It removes a condition so that a notice about low ccache (compiler cache) hit rates is printed both in CI and in local test runs, and updates the ccache command from 'ccache -s' to 'ccache --show-stats'. There is no security relevance.
No security action needed. Treat as a normal CI/logging improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies ci/test/03_test_script.sh. It drops the ‘if [ “$CI” = “true” ]’ guard around the ccache hit-rate check and notice emission, and changes ‘ccache -s’ to ‘ccache –show-stats’. This only affects informational CI logging behavior and has no impact on Bitcoin Core runtime, consensus, wallet, networking, or build outputs.
Changed components
ci/test/03_test_script.shInspect captured patch +3 / −5
diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh
index 7f605fb0..e0048318 100755
--- a/ci/test/03_test_script.sh
+++ b/ci/test/03_test_script.sh
@@ -148,11 +148,9 @@ cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target $GOAL || (
)
bash -c "${PRINT_CCACHE_STATISTICS}"
-if [ "$CI" = "true" ]; then
- hit_rate=$(ccache -s | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
- if [ "${hit_rate%.*}" -lt 75 ]; then
- echo "::notice title=low ccache hitrate::Ccache hit-rate in $CONTAINER_NAME was $hit_rate%"
- fi
+hit_rate=$(ccache --show-stats | grep "Hits:" | head -1 | sed 's/.*(\(.*\)%).*/\1/')
+if [ "${hit_rate%.*}" -lt 75 ]; then
+ echo "::notice title=low ccache hitrate::Ccache hit-rate in $CONTAINER_NAME was $hit_rate%"
fi
du -sh "${DEPENDS_DIR}"/*/
du -sh "${PREVIOUS_RELEASES_DIR}"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.