mirror of
https://github.com/esphome/esphome.git
synced 2026-09-01 10:36:01 +00:00
0dd2a57ba4811307f2623c805efe5a16b2f11ea7
Adds a CI gate that runs `python -X importtime -c "import esphome.__main__"` via importtime-waterfall's best-of-N harness, compares the root cumulative time against a checked-in budget (script/import_time_budget.json, seeded at 75.2ms with a 15% margin), and fails the build when top-level imports regress. The CLI pays this cost on every invocation before the requested command even runs, so silently adding a top-level dep chain (the recent zeroconf move in #13135 being the motivating case) hurts every user. The check gives us a signal without waiting for user reports. - script/check_import_time.py: --check / --update / --har PATH modes. On regression, prints a ranked top-15 offenders table by self-time. - script/import_time_budget.json: baseline + margin_pct. - script/determine-jobs.py: should_run_import_time() gates the job on esphome/**/*.py, requirements.txt, requirements_dev.txt, pyproject.toml, or changes to the check itself. - .github/workflows/ci.yml: new import-time job, runs when gated and uploads a waterfall HAR artifact (14-day retention) for inspection.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
587 MiB
Languages
C++
56.1%
Python
43.3%
C
0.3%
JavaScript
0.2%
