Merge bitcoin/bitcoin#34453: ci: Always print low ccache hit rate notice

fad2876ec330dbb833905d3b2ee5753abc3bc3af ci: Always print low ccache hit rate notice (MarcoFalke)

Pull request description:

  Looks like the hit rate is low, even on test changes such as https://github.com/bitcoin/bitcoin/actions/runs/21476546461/job/61867393974#step:10:3349

  to make it easier to debug, unconditionally print the low hit rate notice

ACKs for top commit:
  l0rinc:
    ACK fad2876ec330dbb833905d3b2ee5753abc3bc3af
  sedited:
    ACK fad2876ec330dbb833905d3b2ee5753abc3bc3af

Tree-SHA512: 0cd85e3572e8465ec424766b1fdb6181d7e607cae991889b46cc66e5f08354772b6040a9f14c0864d36e1f38894628819a3a7458d3ec9ea32e063257177740a0
This commit is contained in:
merge-script 2026-01-30 09:23:10 +01:00
commit 23a2e3354e
No known key found for this signature in database
GPG Key ID: 9B79B45691DB4173

View File

@ -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}"