Update to version 3.9.6

This commit is contained in:
2026-02-10 12:34:12 +01:00
parent 2617252395
commit c98a476228
94 changed files with 4593 additions and 1434 deletions

25
.github/workflows/arduino-lint.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Arduino Lint
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
arduino-lint:
name: Arduino Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: arduino/arduino-lint-action@v2
with:
library-manager: update

194
.github/workflows/build-esp32.yml vendored Normal file
View File

@@ -0,0 +1,194 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build (ESP32)
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
arduino-esp32:
name: ESP32 (arduino-cli) - Release
runs-on: ubuntu-latest
steps:
- name: Install arduino-cli
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
- name: Update core index
run: arduino-cli core update-index --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
- name: Install core
run: arduino-cli core install --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json esp32:esp32
- name: Install ArduinoJson
run: arduino-cli lib install ArduinoJson
- name: Install AsyncTCP (ESP32)
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/AsyncTCP#v3.4.10
- name: Checkout
uses: actions/checkout@v5
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
arduino-cli compile --library . --warnings none -b esp32:esp32:esp32 "examples/$i/$i.ino"
done
arduino-esp32-dev:
name: ESP32 (arduino-cli) - Dev
runs-on: ubuntu-latest
steps:
- name: Install arduino-cli
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
- name: Update core index
run: arduino-cli core update-index --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
- name: Install core
run: arduino-cli core install --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json esp32:esp32
- name: Install ArduinoJson
run: arduino-cli lib install ArduinoJson
- name: Install AsyncTCP (ESP32)
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/AsyncTCP#v3.4.10
- name: Checkout
uses: actions/checkout@v5
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
arduino-cli compile --library . --warnings none -b esp32:esp32:esp32 "examples/$i/$i.ino"
done
platformio-esp32-arduino2:
name: ESP32 (pio) - Arduino 2
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- esp32dev
- esp32-s2-saola-1
- esp32-s3-devkitc-1
- esp32-c3-devkitc-02
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
enable-cache: false
- name: Install platformio
run: |
uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.18.zip
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-2
done
platformio-esp32-arduino-3:
name: ESP32 (pio) - Arduino 3
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- esp32dev
- esp32-s2-saola-1
- esp32-s3-devkitc-1
- esp32-c3-devkitc-02
- esp32-c6-devkitc-1
- esp32-h2-devkitm-1
- esp32-p4
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
enable-cache: false
- name: Install platformio
run: |
uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.18.zip
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-arduino-3
done
platformio-specific-envs:
name: ESP32 (pio) - Specific Envs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
env:
- ci-latest-asynctcp
- ci-no-json
- ci-no-chunk-inflight
- ci-arduino-2-esp-idf-log
- ci-arduino-3-esp-idf-log
- ci-regex
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
enable-cache: false
- name: Install platformio
run: |
uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.18.zip
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=esp32dev pio run -e ${{ matrix.env }}
done

82
.github/workflows/build-esp8266.yml vendored Normal file
View File

@@ -0,0 +1,82 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build (8266)
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
arduino-esp8266:
name: ESP8266 (arduino-cli)
runs-on: ubuntu-latest
steps:
- name: Install arduino-cli
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
- name: Update core index
run: arduino-cli core update-index --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
- name: Install core
run: arduino-cli core install --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json esp8266:esp8266
- name: Install ArduinoJson
run: arduino-cli lib install ArduinoJson
- name: Install ESPAsyncTCP (ESP8266)
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ESP32Async/ESPAsyncTCP#v2.0.0
- name: Checkout
uses: actions/checkout@v5
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
arduino-cli compile --library . --warnings none -b esp8266:esp8266:huzzah "examples/$i/$i.ino"
done
platformio-esp8266:
name: ESP8266 (pio)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- huzzah
- d1_mini
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
enable-cache: false
- name: Install platformio
run: |
uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.18.zip
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-esp8266
done

51
.github/workflows/build-libretiny.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build (LibreTiny)
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
platformio-libretiny:
name: LibreTiny (pio)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- generic-bk7231n-qfn32-tuya
- generic-rtl8710bn-2mb-788k
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
enable-cache: false
- name: Install platformio
run: |
uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.18.zip
- name: Build Examples
run: |
for i in AsyncResponseStream Auth Headers; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-libretiny
done

89
.github/workflows/build-rpi.yml vendored Normal file
View File

@@ -0,0 +1,89 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build (RPI)
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
arduino-rpi:
name: RPI (arduino-cli)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- rpipicow
- rpipico2w
steps:
- name: Install arduino-cli
run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/usr/local/bin sh
- name: Update core index
run: arduino-cli core update-index --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/4.4.4/package_rp2040_index.json
- name: Install core
run: arduino-cli core install --additional-urls https://github.com/earlephilhower/arduino-pico/releases/download/4.4.4/package_rp2040_index.json rp2040:rp2040
- name: Install ArduinoJson
run: arduino-cli lib install ArduinoJson
- name: Install RPAsyncTCP
run: ARDUINO_LIBRARY_ENABLE_UNSAFE_INSTALL=true arduino-cli lib install --git-url https://github.com/ayushsharma82/RPAsyncTCP#v1.3.2
- name: Checkout
uses: actions/checkout@v5
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
arduino-cli compile --library . --warnings none -b rp2040:rp2040:${{ matrix.board }} "examples/$i/$i.ino"
done
platformio-rpi:
name: RPI (pio)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- rpipicow
- rpipico2w
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
enable-cache: false
- name: Install platformio
run: |
uv pip install --system -U https://github.com/pioarduino/platformio-core/archive/refs/tags/v6.1.18.zip
- name: Build Examples
run: |
for i in `ls examples`; do
echo "============================================================="
echo "Building examples/$i..."
echo "============================================================="
PLATFORMIO_SRC_DIR=examples/$i PIO_BOARD=${{ matrix.board }} pio run -e ci-raspberrypi
done

46
.github/workflows/cpplint.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Cpplint
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
cpplint:
name: cpplint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cpplint
path: ~/.cache/pip
- name: Pyhton
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: cpplint
run: |
python -m pip install --upgrade pip
pip install --upgrade cpplint
cpplint \
--repository=. \
--recursive \
--filter=-build/c++11,-build/namespaces,-readability/braces,-readability/casting,-readability/todo,-runtime/explicit,-runtime/indentation_namespace,-runtime/int,-runtime/references,-whitespace/blank_line,,-whitespace/braces,-whitespace/comments,-whitespace/indent,-whitespace/line_length,-whitespace/newline,-whitespace/parens \
lib \
include \
src

64
.github/workflows/pre-commit-status.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
# This needs to be in a separate workflow because it requires higher permissions than the calling workflow
name: Report Pre-commit Check Status
on:
workflow_run:
workflows: [Pre-commit hooks]
types:
- completed
permissions:
statuses: write
jobs:
report-success:
name: Report pre-commit success
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Report success
uses: actions/github-script@v7
with:
script: |
const owner = '${{ github.repository_owner }}';
const repo = '${{ github.repository }}'.split('/')[1];
const sha = '${{ github.event.workflow_run.head_sha }}';
core.debug(`owner: ${owner}`);
core.debug(`repo: ${repo}`);
core.debug(`sha: ${sha}`);
const { context: name, state } = (await github.rest.repos.createCommitStatus({
context: 'Pre-commit checks',
description: 'Pre-commit checks successful',
owner: owner,
repo: repo,
sha: sha,
state: 'success',
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}'
})).data;
core.info(`${name} is ${state}`);
report-pending:
name: Report pre-commit pending
if: github.event.workflow_run.conclusion != 'success'
runs-on: ubuntu-latest
steps:
- name: Report pending
uses: actions/github-script@v7
with:
script: |
const owner = '${{ github.repository_owner }}';
const repo = '${{ github.repository }}'.split('/')[1];
const sha = '${{ github.event.workflow_run.head_sha }}';
core.debug(`owner: ${owner}`);
core.debug(`repo: ${repo}`);
core.debug(`sha: ${sha}`);
const { context: name, state } = (await github.rest.repos.createCommitStatus({
context: 'Pre-commit checks',
description: 'The pre-commit checks need to be successful before merging',
owner: owner,
repo: repo,
sha: sha,
state: 'pending',
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}'
})).data;
core.info(`${name} is ${state}`);

80
.github/workflows/pre-commit.yml vendored Normal file
View File

@@ -0,0 +1,80 @@
name: Pre-commit hooks
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, labeled]
concurrency:
group: pre-commit-${{github.event.pull_request.number || github.ref}}
cancel-in-progress: true
jobs:
lint:
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'Status: Pending Merge') ||
contains(github.event.pull_request.labels.*.name, 'Re-trigger Pre-commit')
name: Check if fixes are needed
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit
uses: actions/checkout@v5
with:
fetch-depth: 2
- name: Remove Label
if: contains(github.event.pull_request.labels.*.name, 'Re-trigger Pre-commit')
run: gh pr edit ${{ github.event.number }} --remove-label 'Re-trigger Pre-commit'
env:
GH_TOKEN: ${{ github.token }}
- name: Set up Python 3
uses: actions/setup-python@v6
with:
cache-dependency-path: pre-commit.requirements.txt
cache: "pip"
python-version: "3.13"
- name: Get Python version hash
run: |
echo "Using $(python -VV)"
echo "PY_HASH=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Restore pre-commit cache
uses: actions/cache/restore@v4
id: restore-cache
with:
path: |
~/.cache/pre-commit
key: pre-commit-${{ env.PY_HASH }}-${{ hashFiles('.pre-commit-config.yaml', '.github/workflows/pre-commit.yml', 'pre-commit.requirements.txt') }}
- name: Install python dependencies
run: python -m pip install -r pre-commit.requirements.txt
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42.0.2
- name: Run pre-commit hooks in changed files
run: pre-commit run --color=always --show-diff-on-failure --files ${{ steps.changed-files.outputs.all_changed_files }}
- name: Save pre-commit cache
uses: actions/cache/save@v4
if: ${{ always() && steps.restore-cache.outputs.cache-hit != 'true' }}
continue-on-error: true
with:
path: |
~/.cache/pre-commit
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
- name: Push changes using pre-commit-ci-lite
uses: pre-commit-ci/lite-action@v1.1.0
# Only push changes in PRs
if: ${{ always() && github.event_name == 'pull_request' }}
with:
msg: "ci(pre-commit): Apply automatic fixes"

View File

@@ -0,0 +1,62 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Publish to PlatformIO
on:
workflow_dispatch:
inputs:
tag_name:
description: "Tag name of the release to publish (use 'latest' for the most recent tag)"
required: true
default: "latest"
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-tags: true
fetch-depth: 0 # Ensure all commits and tags are fetched
- name: Show latest tag
run: git tag --sort=-creatordate | head -n 1
- name: Download release zip
run: |
if [ "${{ inputs.tag_name }}" == "latest" ]; then
TAG_NAME=$(git tag --sort=-creatordate | head -n 1)
if [ -z "$TAG_NAME" ]; then
echo "Error: No tags found in the repository."
exit 1
fi
else
TAG_NAME="${{ inputs.tag_name }}"
fi
echo "Downloading tag: $TAG_NAME"
curl -L -o project.zip "https://github.com/${{ github.repository }}/archive/refs/tags/$TAG_NAME.zip"
# - name: Cache PlatformIO
# uses: actions/cache@v4
# with:
# key: ${{ runner.os }}-pio
# path: |
# ~/.cache/pip
# ~/.platformio
- name: Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install PlatformIO CLI
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Publish to PlatformIO
run: pio pkg publish --no-interactive --owner ${{ github.repository_owner }} project.zip
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}

24
.github/workflows/stale.yaml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: "Close stale issues and PRs"
on:
schedule:
- cron: "30 1 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days."
stale-pr-message: "This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days."
close-issue-message: "This issue was closed because it has been stalled for 7 days with no activity."
close-pr-message: "This PR was closed because it has been stalled for 7 days with no activity."
days-before-issue-stale: 30
days-before-pr-stale: 30
days-before-issue-close: 7
days-before-pr-close: 7
permissions:
# contents: write # only for delete-branch option
issues: write
pull-requests: write

View File

@@ -0,0 +1,50 @@
name: Publish ESP-IDF Component
on:
workflow_dispatch:
inputs:
tag:
description: 'Component version (1.2.3, 1.2.3-rc1 or 1.2.3.4)'
required: true
git_ref:
description: 'Git ref with the source (branch, tag or commit)'
required: true
permissions:
contents: read
jobs:
upload_components:
runs-on: ubuntu-latest
steps:
- name: Get the release tag
env:
head_branch: ${{ inputs.tag || github.event.workflow_run.head_branch }}
run: |
# Read and sanitize the branch/tag name
branch=$(echo "$head_branch" | tr -cd '[:alnum:]/_.-')
if [[ $branch == refs/tags/* ]]; then
tag="${branch#refs/tags/}"
elif [[ $branch =~ ^[v]*[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
tag=$branch
else
echo "Tag not found in $branch. Exiting..."
exit 1
fi
echo "Tag: $tag"
echo "RELEASE_TAG=$tag" >> $GITHUB_ENV
- uses: actions/checkout@v5
with:
ref: ${{ inputs.git_ref || env.RELEASE_TAG }}
submodules: "recursive"
- name: Upload components to the component registry
uses: espressif/upload-components-ci-action@v1
with:
name: espasyncwebserver
version: ${{ env.RELEASE_TAG }}
namespace: esp32async
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}