mirror of
https://github.com/esphome/esphome.git
synced 2026-08-30 17:46:01 +00:00
Apply simplify pass: shared idedata warning, platform-keyed backend table, one owner for the cache prefix and trigger files
This commit is contained in:
@@ -2,10 +2,11 @@ name: Cache Arduino ESP8266
|
||||
description: >
|
||||
Resolve the pinned Arduino core and xtensa toolchain versions and cache the
|
||||
native ESP8266 install (~110 MB framework + toolchain; no ccache store, the
|
||||
seed job saves before any compile runs). Callers must set env
|
||||
ESPHOME_ARDUINO8266_PREFIX: ~/.esphome-arduino8266 and have the Python venv
|
||||
already restored. Mirrors cache-esp-idf: only dev-branch pushes write the
|
||||
shared cache, everything else restores.
|
||||
seed job saves before any compile runs). Exports
|
||||
ESPHOME_ARDUINO8266_PREFIX to the job so every later step installs into
|
||||
the cached path; the Python venv must already be restored. Mirrors
|
||||
cache-esp-idf: only dev-branch pushes write the shared cache, everything
|
||||
else restores.
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
@@ -16,14 +17,10 @@ runs:
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
# The caller's install prefix must match the cached path below, or
|
||||
# the cache silently stores/restores an empty directory. Compare
|
||||
# tilde-expanded: the job env carries a literal ~ that Python's
|
||||
# expanduser and actions/cache both resolve.
|
||||
[ "${ESPHOME_ARDUINO8266_PREFIX/#\~/$HOME}" = "$HOME/.esphome-arduino8266" ] || {
|
||||
echo "ESPHOME_ARDUINO8266_PREFIX is '$ESPHOME_ARDUINO8266_PREFIX', expected '$HOME/.esphome-arduino8266'" >&2
|
||||
exit 1
|
||||
}
|
||||
# One owner for the install prefix: exporting it here (instead of a
|
||||
# per-job env stanza) makes it impossible for a caller to install
|
||||
# into a path other than the one cached below.
|
||||
echo "ESPHOME_ARDUINO8266_PREFIX=$HOME/.esphome-arduino8266" >> "$GITHUB_ENV"
|
||||
. venv/bin/activate
|
||||
key=$(python -c 'from esphome.components.esp8266 import RECOMMENDED_ARDUINO_FRAMEWORK_VERSION as f; from esphome.arduino8266.framework import TOOLCHAIN_VERSION as t; print(f"{f}-{t}")')
|
||||
[ -n "$key" ] || exit 1
|
||||
|
||||
@@ -188,10 +188,6 @@ jobs:
|
||||
# toolchain and discard it.
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
# The composite action and the install below agree on this path by
|
||||
# construction, not by matching the Python-side default
|
||||
ESPHOME_ARDUINO8266_PREFIX: ~/.esphome-arduino8266
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
@@ -1169,7 +1165,6 @@ jobs:
|
||||
env:
|
||||
# Computed by script/determine-jobs.py (ESP8266_NATIVE_TEST_COMPONENTS)
|
||||
TEST_COMPONENTS: ${{ needs.determine-jobs.outputs.esp8266-native-components }}
|
||||
ESPHOME_ARDUINO8266_PREFIX: ~/.esphome-arduino8266
|
||||
steps:
|
||||
- name: Check out code from GitHub
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
Reference in New Issue
Block a user