Files
homeassistant_espscreen/.github/workflows/ci.yml
T
Max Gramser 3b15e7f7a3 Build the screens with ESPHome 2026.9 and keep its build memory in the app's own storage, give the CYD 94 KB more room, and stop a timer from counting one second too many (0.2.89)
The add-on ships ESPHome 2026.9.0: it builds an ESP32 with ESP-IDF itself
and keeps a compiler cache. firmware.py gives the CLI its own storage in
/data (ESPHOME_DATA_DIR /data/esphome, which the ESPHome Device Builder no
longer wipes on start; ESP-IDF and ccache in /data/idf, at most 1 GB;
compilers limited to the core count as PlatformIO ran them), removes the
unused PlatformIO once before the first ESP-IDF build, and leaves the new
folders out of backups.

Firmware 0.2.75: assertion_level SILENT in every board's esp32 block, the
core logs from INFO, and clock_parts() in runtime_model.h replaces sscanf.
timer_left() caps a running timer at its duration (the screen's clock runs
up to a second behind Home Assistant's). The packages keep min_version
2026.6.2, the top-level online_image and OTA passwords for new screens, so
an add-on or Device Builder that isn't updated yet keeps building every
screen; CI now builds both boards with the add-on's ESPHome and with
min_version. ESP-IDF's error names stay on, and build_flags stay under
platformio_options, because ESPHome 2026.9's LVGL reads only those.

tools/check.sh: 478 Python tests, 19/19 C++, editor; --firmware PASS with
ESPHome 2026.6.2 (CYD 87.7 %), 2026.8.1 (88.3 %) and 2026.9.0 (86.4 %,
was 91.5 %). Both bench screens OTA'd and watched for half an hour;
ESP Screens as a local add-on on the Yellow built both profiles
(CYD 1,037 s first build, 41 s unchanged). Details:
docs/TEST_RESULTS_0289.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 12:35:49 +02:00

90 lines
3.3 KiB
YAML

# The release checks of docs/RELEASING.md step 2 on every push and pull request to main (app 0.2.78). Both jobs run
# tools/check.sh, the same script a release runs on a laptop, so CI and a local run can't drift apart.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
checks:
name: checks
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
# What the add-on image adds to ESPHome's (screen_manager/Dockerfile), Pillow for the camera tests (ESPHome
# brings it in the image) and fontTools for tools/generate_icons.py.
- name: Python packages
run: python -m pip install 'aiohttp>=3.12,<4' PyYAML Pillow fonttools
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: web/package-lock.json
- name: clang
run: clang++ --version || (sudo apt-get update && sudo apt-get install -y clang)
- name: tools/check.sh
run: bash tools/check.sh
env:
PYTHON: python
CXX: clang++
firmware:
name: firmware (${{ matrix.esphome }})
needs: checks
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# The ESPHome the add-on ships, and the oldest one the packages promise (`min_version` in packages/core.yaml):
# every screen builds from main with whichever its owner has (docs/RELEASING.md, Compatibility 0.2.89).
esphome: [add-on, min_version]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: ESPHome version
id: esphome
run: |
if [ "${{ matrix.esphome }}" = add-on ]; then
version=$(sed -n 's|^FROM ghcr.io/esphome/esphome:||p' screen_manager/Dockerfile)
else
version=$(sed -n 's/^ min_version: //p' packages/core.yaml)
fi
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: ESPHome
run: python -m pip install "esphome==${{ steps.esphome.outputs.version }}"
# ESPHome 2026.7+ builds with ESP-IDF itself and reuses what it compiled before when ccache is on the PATH.
- name: ccache
run: ccache --version || (sudo apt-get update && sudo apt-get install -y ccache)
# ESP-IDF, its tools and ccache's cache (ESPHome 2026.7+ keeps them in ~/.cache/esphome), PlatformIO's toolchains
# (ESPHome before 2026.7), and the two check builds (tools/check.sh builds under .esphome/check).
- uses: actions/cache@v4
with:
path: |
~/.cache/esphome
~/.platformio
.esphome/check
key: firmware-${{ runner.os }}-esphome-${{ steps.esphome.outputs.version }}-${{ hashFiles('home-like-2432s028.yaml', 'guition-4848s040.yaml', 'packages/**', 'components/**') }}
restore-keys: |
firmware-${{ runner.os }}-esphome-${{ steps.esphome.outputs.version }}-
- name: tools/check.sh --firmware
run: bash tools/check.sh --firmware
env:
PYTHON: python