mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
ci: add ccache hit-rate warning when < 75%
Print the ccache hit-rate for the job using a GitHub annotation if it was below 75%.
This commit is contained in:
@@ -8,6 +8,7 @@ export LC_ALL=C.UTF-8
|
|||||||
|
|
||||||
# Homebrew's python@3.12 is marked as externally managed (PEP 668).
|
# Homebrew's python@3.12 is marked as externally managed (PEP 668).
|
||||||
# Therefore, `--break-system-packages` is needed.
|
# Therefore, `--break-system-packages` is needed.
|
||||||
|
export CONTAINER_NAME="ci_mac_native" # macos does not use a container, but the env var is needed for logging
|
||||||
export PIP_PACKAGES="--break-system-packages zmq"
|
export PIP_PACKAGES="--break-system-packages zmq"
|
||||||
export GOAL="install deploy"
|
export GOAL="install deploy"
|
||||||
export CMAKE_GENERATOR="Ninja"
|
export CMAKE_GENERATOR="Ninja"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
|
|
||||||
|
export CONTAINER_NAME="ci_mac_native_fuzz" # macos does not use a container, but the env var is needed for logging
|
||||||
export CMAKE_GENERATOR="Ninja"
|
export CMAKE_GENERATOR="Ninja"
|
||||||
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
|
export BITCOIN_CONFIG="-DBUILD_FOR_FUZZING=ON -DCMAKE_EXE_LINKER_FLAGS='-Wl,-stack_size -Wl,0x80000'"
|
||||||
export CI_OS_NAME="macos"
|
export CI_OS_NAME="macos"
|
||||||
|
|||||||
@@ -145,6 +145,12 @@ cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target all $GOAL || (
|
|||||||
)
|
)
|
||||||
|
|
||||||
bash -c "${PRINT_CCACHE_STATISTICS}"
|
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
|
||||||
|
fi
|
||||||
du -sh "${DEPENDS_DIR}"/*/
|
du -sh "${DEPENDS_DIR}"/*/
|
||||||
du -sh "${PREVIOUS_RELEASES_DIR}"
|
du -sh "${PREVIOUS_RELEASES_DIR}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user