Skip to content

Commit cf324b1

Browse files
authored
Merge branch 'espressif:master' into Development
2 parents 77a6b8e + 7575fa0 commit cf324b1

File tree

256 files changed

+10006
-2038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+10006
-2038
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v3.1.2
45+
- v3.1.1
4446
- v3.1.0
4547
- v3.0.7
4648
- v3.0.6

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Arduino ESP32 Gitter Channel
4-
url: https://gitter.im/espressif/arduino-esp32
5-
about: Community channel for questions and help
3+
- name: Arduino Core for Espressif Discord Server
4+
url: https://discord.gg/8xY6e9crwv
5+
about: Community Discord server for questions and help
66
- name: ESP32 Forum - Arduino
77
url: https://esp32.com/viewforum.php?f=19
88
about: Official Forum for questions

.github/scripts/tests_run.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ function run_test {
1111
local error=0
1212
local sdkconfig_path
1313
local extra_args
14+
local test_type
1415

1516
sketchdir=$(dirname "$sketch")
1617
sketchname=$(basename "$sketchdir")
18+
test_type=$(basename "$(dirname "$sketchdir")")
1719

1820
if [ "$options" -eq 0 ] && [ -f "$sketchdir"/ci.json ]; then
1921
len=$(jq -r --arg target "$target" '.fqbn[$target] | length' "$sketchdir"/ci.json)
@@ -48,10 +50,10 @@ function run_test {
4850
return 0
4951
fi
5052

51-
local right_target
52-
right_target=$(grep -E "^CONFIG_IDF_TARGET=\"$target\"$" "$sdkconfig_path")
53-
if [ -z "$right_target" ]; then
54-
printf "\033[91mError: Sketch %s compiled for different target\n\033[0m\n" "$sketchname"
53+
local compiled_target
54+
compiled_target=$(grep -E "CONFIG_IDF_TARGET=" "$sdkconfig_path" | cut -d'"' -f2)
55+
if [ "$compiled_target" != "$target" ]; then
56+
printf "\033[91mError: Sketch %s compiled for %s, expected %s\033[0m\n" "$sketchname" "$compiled_target" "$target"
5557
printf "\n\n\n"
5658
return 1
5759
fi
@@ -113,14 +115,14 @@ function run_test {
113115
rm "$sketchdir"/diagram.json 2>/dev/null || true
114116

115117
result=0
116-
printf "\033[95mpytest \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "${extra_args[*]@Q}"
117-
bash -c "set +e; pytest \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" ${extra_args[*]@Q}; exit \$?" || result=$?
118+
printf "\033[95mpytest \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}"
119+
bash -c "set +e; pytest \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$?
118120
printf "\n"
119121
if [ $result -ne 0 ]; then
120122
result=0
121123
printf "\033[95mRetrying test: %s -- Config: %s\033[0m\n" "$sketchname" "$i"
122-
printf "\033[95mpytest \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "${extra_args[*]@Q}"
123-
bash -c "set +e; pytest \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" ${extra_args[*]@Q}; exit \$?" || result=$?
124+
printf "\033[95mpytest \"%s/test_%s.py\" --build-dir \"%s\" --junit-xml=\"%s\" -o junit_suite_name=%s_%s_%s_%s%s %s\033[0m\n" "$sketchdir" "$sketchname" "$build_dir" "$report_file" "$test_type" "$platform" "$target" "$sketchname" "$i" "${extra_args[*]@Q}"
125+
bash -c "set +e; pytest \"$sketchdir/test_$sketchname.py\" --build-dir \"$build_dir\" --junit-xml=\"$report_file\" -o junit_suite_name=${test_type}_${platform}_${target}_${sketchname}${i} ${extra_args[*]@Q}; exit \$?" || result=$?
124126
printf "\n"
125127
if [ $result -ne 0 ]; then
126128
printf "\033[91mFailed test: %s -- Config: %s\033[0m\n\n" "$sketchname" "$i"

.github/workflows/build_py_tools.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
find-changed-tools:
1414
name: Check if tools have been changed
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-latest
1616
outputs:
1717
any_changed: ${{ steps.verify-changed-files.outputs.any_changed }}
1818
all_changed_files: ${{ steps.verify-changed-files.outputs.all_changed_files }}
@@ -55,7 +55,7 @@ jobs:
5555
strategy:
5656
fail-fast: false
5757
matrix:
58-
os: [windows-latest, macos-latest, ubuntu-20.04, ARM]
58+
os: [windows-latest, macos-latest, ubuntu-latest, ubuntu-24.04-arm]
5959
include:
6060
- os: windows-latest
6161
TARGET: win64
@@ -64,14 +64,12 @@ jobs:
6464
- os: macos-latest
6565
TARGET: macos
6666
SEPARATOR: ":"
67-
- os: ubuntu-20.04
67+
- os: ubuntu-latest
6868
TARGET: linux-amd64
6969
SEPARATOR: ":"
70-
- os: ARM
71-
CONTAINER: python:3.8-bullseye
70+
- os: ubuntu-24.04-arm
7271
TARGET: arm
7372
SEPARATOR: ":"
74-
container: ${{ matrix.CONTAINER }} # use python container on ARM
7573
env:
7674
DISTPATH: pytools-${{ matrix.TARGET }}
7775
PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi"
@@ -96,8 +94,6 @@ jobs:
9694
token: ${{ secrets.TOOLS_UPLOAD_PAT }}
9795
ref: ${{ github.event.pull_request.head.ref }}
9896
- name: Set up Python 3.8
99-
# Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108
100-
if: matrix.os != 'ARM'
10197
uses: actions/setup-python@master
10298
with:
10399
python-version: 3.8

.github/workflows/dangerjs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@ jobs:
2020
uses: espressif/shared-github-dangerjs@v1
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
with:
24+
instructions-cla-link: "https://cla-assistant.io/espressif/arduino-esp32"
25+
instructions-contributions-file: "docs/en/contributing.rst"
2326
rule-max-commits: "false"
2427
commit-messages-min-summary-length: "10"

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ jobs:
237237
needs.gen-chunks.outputs.build_all == 'true' ||
238238
needs.gen-chunks.outputs.build_libraries == 'true' ||
239239
needs.gen-chunks.outputs.build_idf == 'true'
240-
runs-on: ubuntu-20.04
240+
runs-on: ubuntu-latest
241241
strategy:
242242
fail-fast: false
243243
matrix:
244244
# The version names here correspond to the versions of espressif/idf Docker image.
245245
# See https://hub.docker.com/r/espressif/idf/tags and
246246
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
247247
# for details.
248-
idf_ver: ["release-v5.3"]
248+
idf_ver: ["release-v5.4"]
249249
idf_target:
250250
[
251251
"esp32",

.github/workflows/tests_results.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
original_sha=$(cat ./artifacts/parent-artifacts/sha.txt)
4242
original_ref=$(cat ./artifacts/parent-artifacts/ref.txt)
4343
original_conclusion=$(cat ./artifacts/parent-artifacts/conclusion.txt)
44+
original_run_id=$(cat ./artifacts/parent-artifacts/run_id.txt)
4445
4546
# Sanitize the values to avoid security issues
4647
@@ -59,17 +60,27 @@ jobs:
5960
# Conclusion: Allow alphabetical characters and underscores
6061
original_conclusion=$(echo "$original_conclusion" | tr -cd '[:alpha:]_')
6162
63+
# Run ID: Allow numeric characters
64+
original_run_id=$(echo "$original_run_id" | tr -cd '[:digit:]')
65+
6266
echo "original_event=$original_event" >> $GITHUB_ENV
6367
echo "original_action=$original_action" >> $GITHUB_ENV
6468
echo "original_sha=$original_sha" >> $GITHUB_ENV
6569
echo "original_ref=$original_ref" >> $GITHUB_ENV
6670
echo "original_conclusion=$original_conclusion" >> $GITHUB_ENV
71+
echo "original_run_id=$original_run_id" >> $GITHUB_ENV
6772
6873
echo "original_event = $original_event"
6974
echo "original_action = $original_action"
7075
echo "original_sha = $original_sha"
7176
echo "original_ref = $original_ref"
7277
echo "original_conclusion = $original_conclusion"
78+
echo "original_run_id = $original_run_id"
79+
80+
- name: Print links to other runs
81+
run: |
82+
echo "Build, Hardware and QEMU tests: https://github.com/${{ github.repository }}/actions/runs/${{ env.original_run_id }}"
83+
echo "Wokwi tests: https://github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}"
7384
7485
- name: Publish Unit Test Results
7586
uses: EnricoMi/publish-unit-test-result-action@v2
@@ -80,6 +91,17 @@ jobs:
8091
files: ./artifacts/**/*.xml
8192
action_fail: true
8293
compare_to_earlier_commit: false
94+
json_file: ./unity_results.json
95+
json_suite_details: true
96+
97+
- name: Upload JSON
98+
uses: actions/upload-artifact@v4
99+
if: ${{ always() }}
100+
with:
101+
name: unity_results
102+
overwrite: true
103+
path: |
104+
./unity_results.json
83105
84106
- name: Fail if tests failed
85107
if: ${{ env.original_conclusion == 'failure' || env.original_conclusion == 'timed_out' || github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out' }}
@@ -138,11 +160,18 @@ jobs:
138160
})).data;
139161
core.info(`${name} is ${state}`);
140162
141-
- name: Create output folder
163+
- name: Generate report
142164
if: ${{ !cancelled() && (env.original_event == 'schedule' || env.original_event == 'workflow_dispatch') }} # codespell:ignore cancelled
165+
env:
166+
REPORT_FILE: ./runtime-tests-results/RUNTIME_TESTS_REPORT.md
167+
WOKWI_RUN_ID: ${{ github.event.workflow_run.id }}
168+
BUILD_RUN_ID: ${{ env.original_run_id }}
169+
IS_FAILING: ${{ env.original_conclusion == 'failure' || env.original_conclusion == 'timed_out' || github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out' || job.status == 'failure' }}
143170
run: |
144-
rm -rf artifacts
145-
mkdir -p runtime-tests-results
171+
rm -rf artifacts $REPORT_FILE
172+
mv -f ./unity_results.json ./runtime-tests-results/unity_results.json
173+
touch $REPORT_FILE
174+
python3 ./runtime-tests-results/table_generator.py ./runtime-tests-results/unity_results.json >> $REPORT_FILE
146175
147176
- name: Generate badge
148177
if: ${{ !cancelled() && (env.original_event == 'schedule' || env.original_event == 'workflow_dispatch') }} # codespell:ignore cancelled
@@ -161,6 +190,6 @@ jobs:
161190
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
162191
if [[ `git status --porcelain` ]]; then
163192
git add --all
164-
git commit -m "Updated runtime tests badge"
193+
git commit -m "Updated runtime tests report"
165194
git push origin HEAD:gh-pages
166195
fi

.github/workflows/tests_wokwi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ jobs:
109109
printf "\nAction = "
110110
cat artifacts/action.txt
111111
112+
printf "${{ github.event.workflow_run.id }}" >> artifacts/run_id.txt
113+
printf "\nRun ID = "
114+
cat artifacts/run_id.txt
115+
112116
if [ -z "$ref" ] || [ "$ref" == "null" ]; then
113117
echo "Failed to get PR number or ref"
114118
exit 1

.github/workflows/upload-idf-component.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ on:
44
workflow_dispatch:
55
inputs:
66
tag:
7-
description: 'Tag to push to the component registry'
7+
description: 'Version to push to the component registry'
8+
required: true
9+
git_ref:
10+
description: 'Git ref with the source to push to the component registry'
811
required: true
912
workflow_run:
1013
workflows: ["ESP32 Arduino Release"]
@@ -44,7 +47,7 @@ jobs:
4447
4548
- uses: actions/checkout@v4
4649
with:
47-
ref: ${{ env.RELEASE_TAG }}
50+
ref: ${{ inputs.git_ref || env.RELEASE_TAG }}
4851
submodules: "recursive"
4952

5053
- name: Upload components to the component registry

CMakeLists.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# idf.py build
77

88
set(min_supported_idf_version "5.3.0")
9-
set(max_supported_idf_version "5.3.99")
9+
set(max_supported_idf_version "5.4.99")
1010
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}")
1111

1212
if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}")
@@ -33,6 +33,7 @@ set(CORE_SRCS
3333
cores/esp32/esp32-hal-dac.c
3434
cores/esp32/esp32-hal-gpio.c
3535
cores/esp32/esp32-hal-i2c.c
36+
cores/esp32/esp32-hal-i2c-ng.c
3637
cores/esp32/esp32-hal-i2c-slave.c
3738
cores/esp32/esp32-hal-ledc.c
3839
cores/esp32/esp32-hal-matrix.c
@@ -181,6 +182,7 @@ set(ARDUINO_LIBRARY_Matter_SRCS
181182
libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp
182183
libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp
183184
libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp
185+
libraries/Matter/src/MatterEndpoints/MatterThermostat.cpp
184186
libraries/Matter/src/Matter.cpp)
185187

186188
set(ARDUINO_LIBRARY_PPP_SRCS
@@ -242,7 +244,11 @@ set(ARDUINO_LIBRARY_USB_SRCS
242244
set(ARDUINO_LIBRARY_WebServer_SRCS
243245
libraries/WebServer/src/WebServer.cpp
244246
libraries/WebServer/src/Parsing.cpp
245-
libraries/WebServer/src/detail/mimetable.cpp)
247+
libraries/WebServer/src/detail/mimetable.cpp
248+
libraries/WebServer/src/middleware/MiddlewareChain.cpp
249+
libraries/WebServer/src/middleware/AuthenticationMiddleware.cpp
250+
libraries/WebServer/src/middleware/CorsMiddleware.cpp
251+
libraries/WebServer/src/middleware/LoggingMiddleware.cpp)
246252

247253
set(ARDUINO_LIBRARY_NetworkClientSecure_SRCS
248254
libraries/NetworkClientSecure/src/ssl_client.cpp
@@ -285,6 +291,13 @@ set(ARDUINO_LIBRARY_Zigbee_SRCS
285291
libraries/Zigbee/src/ep/ZigbeePressureSensor.cpp
286292
libraries/Zigbee/src/ep/ZigbeeOccupancySensor.cpp
287293
libraries/Zigbee/src/ep/ZigbeeCarbonDioxideSensor.cpp
294+
libraries/Zigbee/src/ep/ZigbeeContactSwitch.cpp
295+
libraries/Zigbee/src/ep/ZigbeeDoorWindowHandle.cpp
296+
libraries/Zigbee/src/ep/ZigbeeWindowCovering.cpp
297+
libraries/Zigbee/src/ep/ZigbeeVibrationSensor.cpp
298+
libraries/Zigbee/src/ep/ZigbeeAnalog.cpp
299+
libraries/Zigbee/src/ep/ZigbeeRangeExtender.cpp
300+
libraries/Zigbee/src/ep/ZigbeeGateway.cpp
288301
)
289302

290303
set(ARDUINO_LIBRARY_BLE_SRCS

0 commit comments

Comments
 (0)