mirror of
https://github.com/alexhopeoconnor/DFTE.git
synced 2026-10-03 22:21:59 +10:00
build: standardize ESP32 3.3.11 test baseline
This commit is contained in:
@@ -25,7 +25,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [esp8266, esp32, esp32_3_3_11]
|
||||
platform: [esp8266, esp32]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
@@ -33,6 +33,4 @@ jobs:
|
||||
python-version: '3.11'
|
||||
- run: python -m pip install --upgrade platformio==6.1.19
|
||||
- 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 }}
|
||||
|
||||
@@ -21,9 +21,6 @@ jobs:
|
||||
- run: ./scripts/test.sh examples --platform esp8266
|
||||
- run: ./scripts/test.sh compile --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/prepare-release.sh "$GITHUB_REF_NAME"
|
||||
- run: ./scripts/release-notes.sh "$GITHUB_REF_NAME" > "$RUNNER_TEMP/release-notes.md"
|
||||
|
||||
+7
-15
@@ -4,20 +4,16 @@ Released applications should use a public Git tag. While changing DFTE with a si
|
||||
|
||||
## Target pins
|
||||
|
||||
DFTE keeps two explicit ESP32 fixture lanes while consumers move to the current
|
||||
framework baseline:
|
||||
DFTE uses one maintained ESP32 fixture baseline:
|
||||
|
||||
| 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_3_3_11` | `55.03.311` | Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 | Current validation baseline |
|
||||
| `esp32` | `55.03.311` | Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 | Maintained 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
|
||||
stack. Do not copy a compiler or toolchain package between lanes; each pinned
|
||||
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`
|
||||
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
|
||||
[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:
|
||||
`${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
|
||||
pioarduino uploader. Override it with `DFTE_PLATFORMIO_CORE_DIR`,
|
||||
stale global `tool-esptoolpy` installation from shadowing the current pioarduino
|
||||
uploader. Override it with `DFTE_PLATFORMIO_CORE_DIR`,
|
||||
`DFTE_PLATFORMIO_PACKAGES_DIR`, and `DFTE_PLATFORMIO_CACHE_DIR` for another
|
||||
disk or a disposable clean-room investigation; do not delete an unrelated
|
||||
global toolchain or pin one compiler separately.
|
||||
disk; the script never clears that cache or pins 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:
|
||||
|
||||
@@ -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 examples --platform esp8266
|
||||
./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
|
||||
```
|
||||
|
||||
|
||||
+6
-12
@@ -1,29 +1,23 @@
|
||||
# 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
|
||||
./scripts/test.sh compile --platform esp8266
|
||||
./scripts/test.sh compile --platform esp32
|
||||
./scripts/test.sh examples --platform esp8266
|
||||
./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_3_3_11` uses pioarduino `55.03.311` (Arduino-ESP32 3.3.11 / ESP-IDF
|
||||
5.5.5) as the current validation baseline. The three `compile` commands
|
||||
compile the complete suites with `test_build_src = yes`; the example commands
|
||||
`esp32` uses pioarduino `55.03.311` (Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5).
|
||||
The `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
|
||||
documentation links users to. CI runs every listed target lane on the
|
||||
maintained branch and pull requests.
|
||||
|
||||
The current lane is isolated by the script in a dedicated Core/cache directory
|
||||
so the package-form Arduino-ESP32 Core 3.3.11 uploader cannot inherit legacy 3.0.5 Python
|
||||
metadata. `packages` prints the resolved package graph after the current build;
|
||||
it is a verification step, not a request to change a compiler pin.
|
||||
The ESP32 lane uses a persistent dedicated Core/cache directory so the
|
||||
package-form Arduino-ESP32 uploader cannot inherit stale global Python
|
||||
metadata. The test script never clears that cache.
|
||||
|
||||
The standalone examples are buildable PlatformIO projects; see [examples](../examples/README.md).
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ build_flags =
|
||||
-I$PROJECT_LIBDEPS_DIR/$PIOENV/ESPAsyncTCP/src
|
||||
|
||||
[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
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
@@ -34,7 +34,3 @@ build_flags =
|
||||
-DSOC_WIFI_SUPPORTED=1
|
||||
-I${platformio.packages_dir}/framework-arduinoespressif32/libraries/Network/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
|
||||
|
||||
@@ -15,9 +15,5 @@ platform_packages =
|
||||
platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#521ae60a89e64bb0d1eb7a0b7addf620ced5cad3
|
||||
|
||||
[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
|
||||
board = esp32dev
|
||||
|
||||
@@ -15,9 +15,5 @@ platform_packages =
|
||||
platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#521ae60a89e64bb0d1eb7a0b7addf620ced5cad3
|
||||
|
||||
[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
|
||||
board = esp32dev
|
||||
|
||||
+3
-5
@@ -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.
|
||||
|
||||
The normal `example_esp32` / `dashboard_esp32` environments retain the
|
||||
Arduino-ESP32 3.0.5 compatibility lane. Repository CI also builds the matching
|
||||
`*_esp32_3_3_11` environments against the current Arduino-ESP32 3.3.11
|
||||
validation baseline. A consuming application should select and pin its own
|
||||
complete PlatformIO platform stack.
|
||||
The `example_esp32` / `dashboard_esp32` environments use Arduino-ESP32 3.3.11.
|
||||
A consuming application should select and pin its own complete PlatformIO
|
||||
platform stack.
|
||||
|
||||
| Example | Start here when you want to… |
|
||||
| --- | --- |
|
||||
|
||||
@@ -24,7 +24,7 @@ build_flags =
|
||||
-I$PROJECT_LIBDEPS_DIR/$PIOENV/ESPAsyncTCP/src
|
||||
|
||||
[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
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
@@ -34,7 +34,3 @@ build_flags =
|
||||
-DSOC_WIFI_SUPPORTED=1
|
||||
-I${platformio.packages_dir}/framework-arduinoespressif32/libraries/Network/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
@@ -9,16 +9,11 @@ test_framework = unity
|
||||
test_build_src = yes
|
||||
|
||||
[env:test_template_engine_esp32]
|
||||
; Legacy Arduino-ESP32 3.0.5 compatibility lane. Keep this explicit while
|
||||
; consumers complete their migration to the current validation baseline below.
|
||||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
|
||||
; Arduino-ESP32 3.3.11 / ESP-IDF 5.5.5 is the maintained ESP32 baseline.
|
||||
; Pin the complete pioarduino platform so its framework and toolchain stay
|
||||
; 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
|
||||
framework = arduino
|
||||
test_framework = unity
|
||||
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
@@ -2,25 +2,26 @@
|
||||
set -euo pipefail
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
[[ $# -eq 3 && ( "${1:-}" == "compile" || "${1:-}" == "examples" || "${1:-}" == "packages" ) && "${2:-}" == "--platform" ]] || usage
|
||||
[[ $# -eq 3 && ( "${1:-}" == "compile" || "${1:-}" == "examples" ) && "${2:-}" == "--platform" ]] || usage
|
||||
case "${3:-}" in
|
||||
esp8266|esp32|esp32_3_3_11) platform="$3" ;;
|
||||
esp8266|esp32) platform="$3" ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
||||
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
pio_for_platform() {
|
||||
if [[ "$platform" != "esp32_3_3_11" ]]; then
|
||||
if [[ "$platform" != "esp32" ]]; then
|
||||
pio "$@"
|
||||
return
|
||||
fi
|
||||
|
||||
# Arduino-ESP32 Core 3.3.11 uses a package-form uploader. Isolate its Core-managed
|
||||
# Python environment from the legacy 3.0.5 tool-esptoolpy graph.
|
||||
# Keep the maintained Core 3.3.11 package-form uploader in one persistent,
|
||||
# repository-owned cache. This avoids unrelated global package metadata;
|
||||
# it is never cleared by this script.
|
||||
local core_dir packages_dir cache_dir
|
||||
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}"
|
||||
@@ -31,16 +32,11 @@ pio_for_platform() {
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
compile|packages)
|
||||
compile)
|
||||
case "$platform" in
|
||||
esp8266) test_environment="test_template_engine_8266" ;;
|
||||
esp32) test_environment="test_template_engine_esp32" ;;
|
||||
esp32_3_3_11) test_environment="test_template_engine_esp32_3_3_11" ;;
|
||||
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
|
||||
echo "DFTE compile check passed for $platform"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user