build: share maintained ESP32 cache

This commit is contained in:
2026-09-20 19:43:40 +10:00
parent 85d34e60c5
commit 4aa53c08d9
2 changed files with 7 additions and 6 deletions
+6 -5
View File
@@ -23,11 +23,12 @@ note](https://github.com/alexhopeoconnor/arduino-home-assistant/blob/main/docs/E
For the pioarduino release-to-Core mapping and cache-collision diagnosis, see For the pioarduino release-to-Core mapping and cache-collision diagnosis, see
[DeviceFramework's toolchain guide](https://github.com/alexhopeoconnor/DeviceFramework/blob/main/docs/TOOLCHAINS.md). [DeviceFramework's toolchain guide](https://github.com/alexhopeoconnor/DeviceFramework/blob/main/docs/TOOLCHAINS.md).
`./scripts/test.sh` keeps the ESP32 lane in a dedicated persistent PlatformIO `./scripts/test.sh` uses the persistent PlatformIO Core/cache shared by the
Core/cache directory by default: maintained framework repositories:
`${XDG_CACHE_HOME:-$HOME/.cache}/dfte-platformio/core-3.3.11`. That prevents a `${XDG_CACHE_HOME:-$HOME/.cache}/arduino-framework-platformio/core-3.3.11`.
stale global `tool-esptoolpy` installation from shadowing the current pioarduino All maintained ESP32 lanes pin this exact graph, avoiding repeated downloads
uploader. Override it with `DFTE_PLATFORMIO_CORE_DIR`, while keeping stale global `tool-esptoolpy` metadata from shadowing the current
pioarduino uploader. Override it with `DFTE_PLATFORMIO_CORE_DIR`,
`DFTE_PLATFORMIO_PACKAGES_DIR`, and `DFTE_PLATFORMIO_CACHE_DIR` for another `DFTE_PLATFORMIO_PACKAGES_DIR`, and `DFTE_PLATFORMIO_CACHE_DIR` for another
disk; the script never clears that cache or pins one compiler separately. disk; the script never clears that cache or pins one compiler separately.
+1 -1
View File
@@ -23,7 +23,7 @@ pio_for_platform() {
# repository-owned cache. This avoids unrelated global package metadata; # repository-owned cache. This avoids unrelated global package metadata;
# it is never cleared by this script. # it is never cleared by this script.
local core_dir packages_dir cache_dir local core_dir packages_dir cache_dir
core_dir="${DFTE_PLATFORMIO_CORE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/dfte-platformio/core-3.3.11}" core_dir="${DFTE_PLATFORMIO_CORE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/arduino-framework-platformio/core-3.3.11}"
packages_dir="${DFTE_PLATFORMIO_PACKAGES_DIR:-$core_dir/packages}" packages_dir="${DFTE_PLATFORMIO_PACKAGES_DIR:-$core_dir/packages}"
cache_dir="${DFTE_PLATFORMIO_CACHE_DIR:-$core_dir/cache}" cache_dir="${DFTE_PLATFORMIO_CACHE_DIR:-$core_dir/cache}"
install -d -m 700 "$core_dir" "$packages_dir" "$cache_dir" install -d -m 700 "$core_dir" "$packages_dir" "$cache_dir"