build: share maintained ESP32 cache

This commit is contained in:
2026-09-20 19:43:52 +10:00
parent 3892ce1ca9
commit 72e80f236e
2 changed files with 13 additions and 9 deletions
+9 -6
View File
@@ -27,9 +27,10 @@ two maintained lanes:
| `esp32` | ESP32 Dev Module | pioarduino `55.03.311` / Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 | Maintained baseline |
Every lane pins its complete framework stack. The ESP32 runner keeps its
maintained pioarduino graph in a persistent repository cache so stale global
metadata cannot select an uploader or compiler by accident. The ESP8266
framework pin is independent of the ESP32 baseline; see the [linker
maintained pioarduino graph in the persistent cache shared by these maintained
framework repositories, so stale global metadata cannot select an uploader or
compiler by accident without redownloading matching inputs for every repository.
The ESP8266 framework pin is independent of the ESP32 baseline; see the [linker
workaround](ESP8266-LINKER-WORKAROUND.md).
Run the current ESP32 lane locally with:
@@ -39,10 +40,12 @@ Run the current ESP32 lane locally with:
./scripts/test.sh examples --platform esp32
```
The script keeps that lane in a dedicated persistent PlatformIO Core/cache
directory by default (`${XDG_CACHE_HOME:-$HOME/.cache}/arduinoha-platformio/core-3.3.11`).
The script keeps that lane in the persistent PlatformIO Core/cache shared by
the maintained framework repositories by default
(`${XDG_CACHE_HOME:-$HOME/.cache}/arduino-framework-platformio/core-3.3.11`).
This prevents stale global `tool-esptoolpy` metadata from shadowing the current
pioarduino package-form uploader. Set `ARDUINOHA_PLATFORMIO_CORE_DIR`,
pioarduino package-form uploader while avoiding duplicate Core 3.3.11
downloads. Set `ARDUINOHA_PLATFORMIO_CORE_DIR`,
`ARDUINOHA_PLATFORMIO_PACKAGES_DIR`, and
`ARDUINOHA_PLATFORMIO_CACHE_DIR` for a dedicated disk. The script never clears
that cache or repairs it by overriding one compiler package.
+4 -3
View File
@@ -21,10 +21,11 @@ pio_for_platform() {
fi
# Keep Core 3.3.11's package-form esptool and generated pioarduino
# environment in a persistent repository cache. It is never cleared by
# this script, and isolates this tested graph from stale global metadata.
# environment in the persistent cache shared by the maintained framework
# repositories. It is never cleared by this script, and isolates this
# tested graph from stale global metadata without duplicate downloads.
local core_dir packages_dir cache_dir
core_dir="${ARDUINOHA_PLATFORMIO_CORE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/arduinoha-platformio/core-3.3.11}"
core_dir="${ARDUINOHA_PLATFORMIO_CORE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/arduino-framework-platformio/core-3.3.11}"
packages_dir="${ARDUINOHA_PLATFORMIO_PACKAGES_DIR:-$core_dir/packages}"
cache_dir="${ARDUINOHA_PLATFORMIO_CACHE_DIR:-$core_dir/cache}"
install -d -m 700 "$core_dir" "$packages_dir" "$cache_dir"