mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 15:27:33 +00:00
Fix CodSpeed instrumentation with PlatformIO
- Use CodSpeed's codspeed-cpp fork with proper instrumentation for simulation mode benchmark detection - setup_codspeed_lib.py creates a flat PlatformIO-compatible library by combining google_benchmark sources, codspeed core, and instrument-hooks into a single library directory - Renames .cc to .cpp (PlatformIO doesn't compile .cc by default) - Adds all required defines: CODSPEED_ENABLED, CODSPEED_SIMULATION, CODSPEED_VERSION, CODSPEED_ROOT_DIR, CODSPEED_MODE_DISPLAY - Output JSON config consumed by cpp_benchmark.py via env var
This commit is contained in:
@@ -331,9 +331,8 @@ jobs:
|
||||
id: build
|
||||
run: |
|
||||
. venv/bin/activate
|
||||
BENCHMARK_LIB=$(python script/setup_codspeed_lib.py)
|
||||
BENCHMARK_LIB="$BENCHMARK_LIB" \
|
||||
script/cpp_benchmark.py --all --build-only 2>&1 | tee /tmp/bench-build.log
|
||||
export BENCHMARK_LIB_CONFIG=$(python script/setup_codspeed_lib.py)
|
||||
script/cpp_benchmark.py --all --build-only 2>&1 | tee /tmp/bench-build.log
|
||||
BINARY=$(tail -1 /tmp/bench-build.log)
|
||||
echo "binary=$BINARY" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user