mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
[ci] Fail the benchmark job when the C++ benchmark build fails (#18480)
This commit is contained in:
@@ -460,10 +460,21 @@ jobs:
|
|||||||
- name: Build benchmarks
|
- name: Build benchmarks
|
||||||
id: build
|
id: build
|
||||||
run: |
|
run: |
|
||||||
|
# pipefail: without it a failed build is masked by the grep/cut
|
||||||
|
# pipeline below, leaving BINARY empty and silently dropping every
|
||||||
|
# C++ benchmark from the run while the job still reports success.
|
||||||
|
set -o pipefail
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
export BENCHMARK_LIB_CONFIG=$(python script/setup_codspeed_lib.py)
|
BENCHMARK_LIB_CONFIG=$(python script/setup_codspeed_lib.py)
|
||||||
# --build-only prints BUILD_BINARY=<path> to stdout
|
export BENCHMARK_LIB_CONFIG
|
||||||
BINARY=$(script/cpp_benchmark.py --all --build-only | grep '^BUILD_BINARY=' | tail -1 | cut -d= -f2-)
|
# --build-only prints BUILD_BINARY=<path> to stdout; the grep is
|
||||||
|
# non-fatal so a missing marker reaches the check below instead of
|
||||||
|
# tripping errexit at this assignment
|
||||||
|
BINARY=$(script/cpp_benchmark.py --all --build-only | { grep '^BUILD_BINARY=' || true; } | tail -1 | cut -d= -f2-)
|
||||||
|
if [ -z "$BINARY" ]; then
|
||||||
|
echo "::error::Benchmark build did not report a binary path"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "binary=$BINARY" >> $GITHUB_OUTPUT
|
echo "binary=$BINARY" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Run CodSpeed benchmarks
|
- name: Run CodSpeed benchmarks
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ def override_manifest(manifest: ComponentManifestOverride) -> None:
|
|||||||
# components have hardware dependencies (BLE/UART/RMT); lightweight
|
# components have hardware dependencies (BLE/UART/RMT); lightweight
|
||||||
# stub headers in tests/benchmarks/stubs/ satisfy the includes.
|
# stub headers in tests/benchmarks/stubs/ satisfy the includes.
|
||||||
cg.add_define("USE_BLUETOOTH_PROXY")
|
cg.add_define("USE_BLUETOOTH_PROXY")
|
||||||
|
cg.add_define("USE_BLUETOOTH_PROXY_CONNECTIONS")
|
||||||
cg.add_define("BLUETOOTH_PROXY_MAX_CONNECTIONS", 3)
|
cg.add_define("BLUETOOTH_PROXY_MAX_CONNECTIONS", 3)
|
||||||
cg.add_define("BLUETOOTH_PROXY_ADVERTISEMENT_BATCH_SIZE", 16)
|
cg.add_define("BLUETOOTH_PROXY_ADVERTISEMENT_BATCH_SIZE", 16)
|
||||||
cg.add_define("USE_ZWAVE_PROXY")
|
cg.add_define("USE_ZWAVE_PROXY")
|
||||||
|
|||||||
Reference in New Issue
Block a user