build: standardize ESP32 3.3.11 test baseline

This commit is contained in:
2026-09-18 02:41:40 +10:00
parent ec4c32db32
commit 85d34e60c5
11 changed files with 33 additions and 79 deletions
+1 -3
View File
@@ -25,7 +25,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [esp8266, esp32, esp32_3_3_11] platform: [esp8266, esp32]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
@@ -33,6 +33,4 @@ jobs:
python-version: '3.11' python-version: '3.11'
- run: python -m pip install --upgrade platformio==6.1.19 - run: python -m pip install --upgrade platformio==6.1.19
- run: ./scripts/test.sh compile --platform ${{ matrix.platform }} - run: ./scripts/test.sh compile --platform ${{ matrix.platform }}
- if: matrix.platform == 'esp32_3_3_11'
run: ./scripts/test.sh packages --platform esp32_3_3_11
- run: ./scripts/test.sh examples --platform ${{ matrix.platform }} - run: ./scripts/test.sh examples --platform ${{ matrix.platform }}
-3
View File
@@ -21,9 +21,6 @@ jobs:
- run: ./scripts/test.sh examples --platform esp8266 - run: ./scripts/test.sh examples --platform esp8266
- run: ./scripts/test.sh compile --platform esp32 - run: ./scripts/test.sh compile --platform esp32
- run: ./scripts/test.sh examples --platform esp32 - run: ./scripts/test.sh examples --platform esp32
- run: ./scripts/test.sh compile --platform esp32_3_3_11
- run: ./scripts/test.sh packages --platform esp32_3_3_11
- run: ./scripts/test.sh examples --platform esp32_3_3_11
- run: ./scripts/check-docs.sh - run: ./scripts/check-docs.sh
- run: ./scripts/prepare-release.sh "$GITHUB_REF_NAME" - run: ./scripts/prepare-release.sh "$GITHUB_REF_NAME"
- run: ./scripts/release-notes.sh "$GITHUB_REF_NAME" > "$RUNNER_TEMP/release-notes.md" - run: ./scripts/release-notes.sh "$GITHUB_REF_NAME" > "$RUNNER_TEMP/release-notes.md"
+7 -15
View File
@@ -4,20 +4,16 @@ Released applications should use a public Git tag. While changing DFTE with a si
## Target pins ## Target pins
DFTE keeps two explicit ESP32 fixture lanes while consumers move to the current DFTE uses one maintained ESP32 fixture baseline:
framework baseline:
| Test selector | pioarduino platform | Framework stack | Purpose | | Test selector | pioarduino platform | Framework stack | Purpose |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| `esp32` | `51.03.05` | Arduino-ESP32 3.0.5 / ESP-IDF 5.1.4+ | Deliberate legacy compatibility coverage | | `esp32` | `55.03.311` | Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 | Maintained baseline |
| `esp32_3_3_11` | `55.03.311` | Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 | Current validation baseline |
These are fixture contracts, not DFTE package dependencies: a consuming These are test-harness fixture lanes, not DFTE package dependencies: a consuming
application owns its `platform` pin and tests the complete framework/toolchain application owns its `platform` pin and tests the complete framework/toolchain
stack. Do not copy a compiler or toolchain package between lanes; each pinned stack. Do not copy a compiler or toolchain package between lanes; each pinned
pioarduino platform resolves its matched framework, uploader, and toolchain. pioarduino platform resolves its matched framework, uploader, and toolchain.
The legacy lane is retained deliberately until the supported ESP32 floor is
changed in a reviewed compatibility decision.
All DFTE ESP8266 test and example environments pin framework commit `521ae60` All DFTE ESP8266 test and example environments pin framework commit `521ae60`
for the upstream Postmortem large-jump linker fix. The exact rationale and for the upstream Postmortem large-jump linker fix. The exact rationale and
@@ -27,14 +23,13 @@ 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_3_3_11` lane in a dedicated PlatformIO `./scripts/test.sh` keeps the ESP32 lane in a dedicated persistent PlatformIO
Core/cache directory by default: Core/cache directory by default:
`${XDG_CACHE_HOME:-$HOME/.cache}/dfte-platformio/core-3.3.11`. That prevents a `${XDG_CACHE_HOME:-$HOME/.cache}/dfte-platformio/core-3.3.11`. That prevents a
legacy 3.0.5 `tool-esptoolpy` installation from shadowing the current stale global `tool-esptoolpy` installation from shadowing the current pioarduino
pioarduino uploader. Override it with `DFTE_PLATFORMIO_CORE_DIR`, 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 or a disposable clean-room investigation; do not delete an unrelated disk; the script never clears that cache or pins one compiler separately.
global toolchain or pin one compiler separately.
Start a release with `bump-version.sh`. It updates package metadata and canonical installation snippets, then creates the changelog section. Replace its generated TODO with the release summary and update any behavioural documentation before running: Start a release with `bump-version.sh`. It updates package metadata and canonical installation snippets, then creates the changelog section. Replace its generated TODO with the release summary and update any behavioural documentation before running:
@@ -46,9 +41,6 @@ Start a release with `bump-version.sh`. It updates package metadata and canonica
./scripts/test.sh compile --platform esp32 ./scripts/test.sh compile --platform esp32
./scripts/test.sh examples --platform esp8266 ./scripts/test.sh examples --platform esp8266
./scripts/test.sh examples --platform esp32 ./scripts/test.sh examples --platform esp32
./scripts/test.sh compile --platform esp32_3_3_11
./scripts/test.sh packages --platform esp32_3_3_11
./scripts/test.sh examples --platform esp32_3_3_11
./scripts/prepare-release.sh vMAJOR.MINOR.PATCH --tag ./scripts/prepare-release.sh vMAJOR.MINOR.PATCH --tag
``` ```
+6 -12
View File
@@ -1,29 +1,23 @@
# Testing # Testing
The three PlatformIO Unity commands compile the complete DFTE test suites without uploading or executing them, so they require no attached board. The PlatformIO Unity commands compile the complete DFTE test suites without uploading or executing them, so they require no attached board.
```bash ```bash
./scripts/test.sh compile --platform esp8266 ./scripts/test.sh compile --platform esp8266
./scripts/test.sh compile --platform esp32 ./scripts/test.sh compile --platform esp32
./scripts/test.sh examples --platform esp8266 ./scripts/test.sh examples --platform esp8266
./scripts/test.sh examples --platform esp32 ./scripts/test.sh examples --platform esp32
./scripts/test.sh compile --platform esp32_3_3_11
./scripts/test.sh packages --platform esp32_3_3_11
./scripts/test.sh examples --platform esp32_3_3_11
``` ```
`esp32` is the explicit Arduino-ESP32 3.0.5 compatibility lane. `esp32` uses pioarduino `55.03.311` (Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5).
`esp32_3_3_11` uses pioarduino `55.03.311` (Arduino-ESP32 3.3.11 / ESP-IDF The `compile` commands compile the complete suites with `test_build_src = yes`; the example commands
5.5.5) as the current validation baseline. The three `compile` commands
compile the complete suites with `test_build_src = yes`; the example commands
compile every standalone project on each target, protecting the code that the compile every standalone project on each target, protecting the code that the
documentation links users to. CI runs every listed target lane on the documentation links users to. CI runs every listed target lane on the
maintained branch and pull requests. maintained branch and pull requests.
The current lane is isolated by the script in a dedicated Core/cache directory The ESP32 lane uses a persistent dedicated Core/cache directory so the
so the package-form Arduino-ESP32 Core 3.3.11 uploader cannot inherit legacy 3.0.5 Python package-form Arduino-ESP32 uploader cannot inherit stale global Python
metadata. `packages` prints the resolved package graph after the current build; metadata. The test script never clears that cache.
it is a verification step, not a request to change a compiler pin.
The standalone examples are buildable PlatformIO projects; see [examples](../examples/README.md). The standalone examples are buildable PlatformIO projects; see [examples](../examples/README.md).
+1 -5
View File
@@ -24,7 +24,7 @@ build_flags =
-I$PROJECT_LIBDEPS_DIR/$PIOENV/ESPAsyncTCP/src -I$PROJECT_LIBDEPS_DIR/$PIOENV/ESPAsyncTCP/src
[env:dashboard_esp32] [env:dashboard_esp32]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
board = esp32dev board = esp32dev
lib_deps = lib_deps =
${env.lib_deps} ${env.lib_deps}
@@ -34,7 +34,3 @@ build_flags =
-DSOC_WIFI_SUPPORTED=1 -DSOC_WIFI_SUPPORTED=1
-I${platformio.packages_dir}/framework-arduinoespressif32/libraries/Network/src -I${platformio.packages_dir}/framework-arduinoespressif32/libraries/Network/src
-I$PROJECT_LIBDEPS_DIR/$PIOENV/AsyncTCP/src -I$PROJECT_LIBDEPS_DIR/$PIOENV/AsyncTCP/src
[env:dashboard_esp32_3_3_11]
extends = env:dashboard_esp32
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
+1 -5
View File
@@ -15,9 +15,5 @@ platform_packages =
platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#521ae60a89e64bb0d1eb7a0b7addf620ced5cad3 platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#521ae60a89e64bb0d1eb7a0b7addf620ced5cad3
[env:example_esp32] [env:example_esp32]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
board = esp32dev
[env:example_esp32_3_3_11]
extends = env:example_esp32
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
board = esp32dev
+1 -5
View File
@@ -15,9 +15,5 @@ platform_packages =
platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#521ae60a89e64bb0d1eb7a0b7addf620ced5cad3 platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#521ae60a89e64bb0d1eb7a0b7addf620ced5cad3
[env:example_esp32] [env:example_esp32]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
board = esp32dev
[env:example_esp32_3_3_11]
extends = env:example_esp32
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
board = esp32dev
+3 -5
View File
@@ -10,11 +10,9 @@ pio device monitor -d examples/HelloPlaceholder -e example_esp8266
Choose the corresponding ESP32 environment where provided. The examples use the checked-out DFTE source, so they double as practical integration checks for this repository. Choose the corresponding ESP32 environment where provided. The examples use the checked-out DFTE source, so they double as practical integration checks for this repository.
The normal `example_esp32` / `dashboard_esp32` environments retain the The `example_esp32` / `dashboard_esp32` environments use Arduino-ESP32 3.3.11.
Arduino-ESP32 3.0.5 compatibility lane. Repository CI also builds the matching A consuming application should select and pin its own complete PlatformIO
`*_esp32_3_3_11` environments against the current Arduino-ESP32 3.3.11 platform stack.
validation baseline. A consuming application should select and pin its own
complete PlatformIO platform stack.
| Example | Start here when you want to… | | Example | Start here when you want to… |
| --- | --- | | --- | --- |
+1 -5
View File
@@ -24,7 +24,7 @@ build_flags =
-I$PROJECT_LIBDEPS_DIR/$PIOENV/ESPAsyncTCP/src -I$PROJECT_LIBDEPS_DIR/$PIOENV/ESPAsyncTCP/src
[env:example_esp32] [env:example_esp32]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
board = esp32dev board = esp32dev
lib_deps = lib_deps =
${env.lib_deps} ${env.lib_deps}
@@ -34,7 +34,3 @@ build_flags =
-DSOC_WIFI_SUPPORTED=1 -DSOC_WIFI_SUPPORTED=1
-I${platformio.packages_dir}/framework-arduinoespressif32/libraries/Network/src -I${platformio.packages_dir}/framework-arduinoespressif32/libraries/Network/src
-I$PROJECT_LIBDEPS_DIR/$PIOENV/AsyncTCP/src -I$PROJECT_LIBDEPS_DIR/$PIOENV/AsyncTCP/src
[env:example_esp32_3_3_11]
extends = env:example_esp32
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
+4 -9
View File
@@ -9,16 +9,11 @@ test_framework = unity
test_build_src = yes test_build_src = yes
[env:test_template_engine_esp32] [env:test_template_engine_esp32]
; Legacy Arduino-ESP32 3.0.5 compatibility lane. Keep this explicit while ; Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 is the maintained ESP32 baseline.
; consumers complete their migration to the current validation baseline below. ; Pin the complete pioarduino platform so its framework and toolchain stay
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip ; matched; PlatformIO must not select one from an unrelated package cache.
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
board = nodemcu-32s board = nodemcu-32s
framework = arduino framework = arduino
test_framework = unity test_framework = unity
test_build_src = yes test_build_src = yes
; Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 validation lane. Pin the complete
; pioarduino platform so its framework and toolchain stay matched.
[env:test_template_engine_esp32_3_3_11]
extends = env:test_template_engine_esp32
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.311/platform-espressif32.zip
+8 -12
View File
@@ -2,25 +2,26 @@
set -euo pipefail set -euo pipefail
usage() { usage() {
echo "Usage: $0 compile|examples|packages --platform esp8266|esp32|esp32_3_3_11" >&2 echo "Usage: $0 compile|examples --platform esp8266|esp32" >&2
exit 2 exit 2
} }
[[ $# -eq 3 && ( "${1:-}" == "compile" || "${1:-}" == "examples" || "${1:-}" == "packages" ) && "${2:-}" == "--platform" ]] || usage [[ $# -eq 3 && ( "${1:-}" == "compile" || "${1:-}" == "examples" ) && "${2:-}" == "--platform" ]] || usage
case "${3:-}" in case "${3:-}" in
esp8266|esp32|esp32_3_3_11) platform="$3" ;; esp8266|esp32) platform="$3" ;;
*) usage ;; *) usage ;;
esac esac
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
pio_for_platform() { pio_for_platform() {
if [[ "$platform" != "esp32_3_3_11" ]]; then if [[ "$platform" != "esp32" ]]; then
pio "$@" pio "$@"
return return
fi fi
# Arduino-ESP32 Core 3.3.11 uses a package-form uploader. Isolate its Core-managed # Keep the maintained Core 3.3.11 package-form uploader in one persistent,
# Python environment from the legacy 3.0.5 tool-esptoolpy graph. # repository-owned cache. This avoids unrelated global package metadata;
# 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}/dfte-platformio/core-3.3.11}"
packages_dir="${DFTE_PLATFORMIO_PACKAGES_DIR:-$core_dir/packages}" packages_dir="${DFTE_PLATFORMIO_PACKAGES_DIR:-$core_dir/packages}"
@@ -31,16 +32,11 @@ pio_for_platform() {
} }
case "$1" in case "$1" in
compile|packages) compile)
case "$platform" in case "$platform" in
esp8266) test_environment="test_template_engine_8266" ;; esp8266) test_environment="test_template_engine_8266" ;;
esp32) test_environment="test_template_engine_esp32" ;; esp32) test_environment="test_template_engine_esp32" ;;
esp32_3_3_11) test_environment="test_template_engine_esp32_3_3_11" ;;
esac esac
if [[ "$1" == "packages" ]]; then
pio_for_platform pkg list -d "$root" -e "$test_environment"
exit 0
fi
pio_for_platform test -d "$root" -e "$test_environment" --without-uploading --without-testing pio_for_platform test -d "$root" -e "$test_environment" --without-uploading --without-testing
echo "DFTE compile check passed for $platform" echo "DFTE compile check passed for $platform"
exit 0 exit 0