Skip to content

Commit 194693a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/zigbee-library
2 parents 3078306 + 70786dc commit 194693a

File tree

141 files changed

+3560
-551
lines changed

Some content is hidden

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

141 files changed

+3560
-551
lines changed

.github/ISSUE_TEMPLATE/Issue-report.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ body:
4141
options:
4242
- latest master (checkout manually)
4343
- latest development Release Candidate (RC-X)
44+
- v3.0.4
45+
- v3.0.3
46+
- v3.0.2
4447
- v3.0.1
4548
- v3.0.0
4649
- v2.0.17

.github/scripts/install-arduino-cli.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ fi
4141
if [ ! -d "$ARDUINO_IDE_PATH" ] || [ ! -f "$ARDUINO_IDE_PATH/arduino-cli" ]; then
4242
echo "Installing Arduino CLI on $OS_NAME ..."
4343
mkdir -p "$ARDUINO_IDE_PATH"
44-
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
44+
if [ "$OS_IS_WINDOWS" == "1" ]; then
45+
curl -fsSL https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip -o arduino-cli.zip
46+
unzip -q arduino-cli.zip -d "$ARDUINO_IDE_PATH"
47+
rm arduino-cli.zip
48+
else
49+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
50+
fi
4551
fi
4652

.github/scripts/on-release.sh

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ else
192192
cp -Rf "$GITHUB_WORKSPACE/variants/${variant}" "$PKG_DIR/variants/"
193193
done
194194
fi
195+
cp -f "$GITHUB_WORKSPACE/CMakeLists.txt" "$PKG_DIR/"
196+
cp -f "$GITHUB_WORKSPACE/idf_component.yml" "$PKG_DIR/"
197+
cp -f "$GITHUB_WORKSPACE/Kconfig.projbuild" "$PKG_DIR/"
195198
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
196199
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
197200
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
@@ -418,7 +421,54 @@ if [ "$RELEASE_PRE" == "false" ]; then
418421
fi
419422
fi
420423

421-
# Upload package JSONs (temporary halted to fix json generation)
424+
# Test the package JSONs
425+
426+
echo "Installing arduino-cli ..."
427+
export PATH="/home/runner/bin:$PATH"
428+
source ./.github/scripts/install-arduino-cli.sh
429+
430+
echo "Testing $PACKAGE_JSON_DEV install ..."
431+
echo "Updating index ..."
432+
arduino-cli core update-index --additional-urls "file://$OUTPUT_DIR/$PACKAGE_JSON_DEV"
433+
if [ $? -ne 0 ]; then echo "ERROR: Failed to update index ($?)"; exit 1; fi
434+
435+
echo "Installing esp32 ..."
436+
arduino-cli core install esp32:esp32
437+
if [ $? -ne 0 ]; then echo "ERROR: Failed to install esp32 ($?)"; exit 1; fi
438+
439+
echo "Compiling example ..."
440+
arduino-cli compile --fqbn esp32:esp32:esp32 $GITHUB_WORKSPACE/libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
441+
if [ $? -ne 0 ]; then echo "ERROR: Failed to compile example ($?)"; exit 1; fi
442+
443+
echo "Uninstalling esp32 ..."
444+
arduino-cli core uninstall esp32:esp32
445+
if [ $? -ne 0 ]; then echo "ERROR: Failed to uninstall esp32 ($?)"; exit 1; fi
446+
447+
echo "Test successful!"
448+
449+
if [ "$RELEASE_PRE" == "false" ]; then
450+
echo "Testing $PACKAGE_JSON_REL install ..."
451+
echo "Updating index ..."
452+
arduino-cli core update-index --additional-urls "file://$OUTPUT_DIR/$PACKAGE_JSON_REL"
453+
if [ $? -ne 0 ]; then echo "ERROR: Failed to update index ($?)"; exit 1; fi
454+
455+
echo "Installing esp32 ..."
456+
arduino-cli core install esp32:esp32
457+
if [ $? -ne 0 ]; then echo "ERROR: Failed to install esp32 ($?)"; exit 1; fi
458+
459+
echo "Compiling example ..."
460+
arduino-cli compile --fqbn esp32:esp32:esp32 $GITHUB_WORKSPACE/libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino
461+
if [ $? -ne 0 ]; then echo "ERROR: Failed to compile example ($?)"; exit 1; fi
462+
463+
echo "Uninstalling esp32 ..."
464+
arduino-cli core uninstall esp32:esp32
465+
if [ $? -ne 0 ]; then echo "ERROR: Failed to uninstall esp32 ($?)"; exit 1; fi
466+
467+
echo "Test successful!"
468+
fi
469+
470+
# Upload package JSONs
471+
422472
echo "Uploading $PACKAGE_JSON_DEV ..."
423473
echo "Download URL: "`git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
424474
echo "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`

.github/scripts/tests_run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ function run_test() {
6969
if [[ -f "$sketchdir/scenario.yaml" ]]; then
7070
extra_args+=" --wokwi-scenario $sketchdir/scenario.yaml"
7171
fi
72+
if [[ -f "$sketchdir/diagram.$target.json" ]]; then
73+
extra_args+=" --wokwi-diagram $sketchdir/diagram.$target.json"
74+
fi
75+
7276
elif [ $platform == "qemu" ]; then
7377
PATH=$HOME/qemu/bin:$PATH
7478
extra_args="--embedded-services qemu --qemu-image-path $build_dir/$sketchname.ino.merged.bin"

.github/scripts/update-version.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@ sed "s/#define ESP_ARDUINO_VERSION_MAJOR.*/#define ESP_ARDUINO_VERSION_MAJOR $ES
3636
sed "s/#define ESP_ARDUINO_VERSION_MINOR.*/#define ESP_ARDUINO_VERSION_MINOR $ESP_ARDUINO_VERSION_MINOR/g" | \
3737
sed "s/#define ESP_ARDUINO_VERSION_PATCH.*/#define ESP_ARDUINO_VERSION_PATCH $ESP_ARDUINO_VERSION_PATCH/g" > __esp_arduino_version.h && mv __esp_arduino_version.h cores/esp32/esp_arduino_version.h
3838

39+
for lib in `ls libraries`; do
40+
if [ -f "libraries/$lib/library.properties" ]; then
41+
echo "Updating Library $lib..."
42+
cat "libraries/$lib/library.properties" | sed "s/version=.*/version=$ESP_ARDUINO_VERSION/g" > "libraries/$lib/__library.properties" && mv "libraries/$lib/__library.properties" "libraries/$lib/library.properties"
43+
fi
44+
done
45+
3946
exit 0

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
with:
1818
python-version: '3.x'
1919
- run: pip install packaging
20+
- run: pip install pyserial
2021
- name: Build Release
2122
env:
2223
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests_hw.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ on:
1212
description: 'Chip to run tests for'
1313
required: true
1414

15+
env:
16+
DEBIAN_FRONTEND: noninteractive
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
1522
jobs:
1623
hardware-test:
1724
name: Hardware ${{ inputs.chip }} ${{ inputs.type }} tests
@@ -48,6 +55,13 @@ jobs:
4855
- name: Checkout user repository
4956
if: ${{ steps.check-tests.outputs.enabled == 'true' }}
5057
uses: actions/checkout@v4
58+
with:
59+
sparse-checkout: |
60+
*
61+
62+
- name: List files
63+
if: ${{ steps.check-tests.outputs.enabled == 'true' }}
64+
run: ls -la
5165

5266
# setup-python currently only works on ubuntu images
5367
# - uses: actions/setup-python@v5

.github/workflows/tests_results.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ jobs:
2222
statuses: write
2323
checks: write
2424
pull-requests: write
25+
contents: write
2526
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
ref: gh-pages
30+
2631
- name: Download and Extract Artifacts
2732
uses: dawidd6/action-download-artifact@v6
2833
with:
@@ -35,15 +40,18 @@ jobs:
3540
original_action=$(cat ./artifacts/parent-artifacts/action.txt)
3641
original_sha=$(cat ./artifacts/parent-artifacts/sha.txt)
3742
original_ref=$(cat ./artifacts/parent-artifacts/ref.txt)
43+
original_conclusion=$(cat ./artifacts/parent-artifacts/conclusion.txt)
3844
echo "original_event=$original_event" >> $GITHUB_ENV
3945
echo "original_action=$original_action" >> $GITHUB_ENV
4046
echo "original_sha=$original_sha" >> $GITHUB_ENV
4147
echo "original_ref=$original_ref" >> $GITHUB_ENV
48+
echo "original_conclusion=$original_conclusion" >> $GITHUB_ENV
4249
4350
echo "original_event = $original_event"
4451
echo "original_action = $original_action"
4552
echo "original_sha = $original_sha"
4653
echo "original_ref = $original_ref"
54+
echo "original_conclusion = $original_conclusion"
4755
4856
- name: Publish Unit Test Results
4957
uses: EnricoMi/publish-unit-test-result-action@v2
@@ -54,6 +62,10 @@ jobs:
5462
files: ./artifacts/**/*.xml
5563
action_fail: true
5664

65+
- name: Fail if tests failed
66+
if: ${{ env.original_conclusion == 'failure' || env.original_conclusion == 'timed_out' || github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out' }}
67+
run: exit 1
68+
5769
- name: Clean up caches
5870
if: always()
5971
uses: actions/github-script@v7
@@ -102,7 +114,33 @@ jobs:
102114
repo: repo,
103115
sha: sha,
104116
state: '${{ job.status }}',
105-
description: '${{ job.status }}' ? 'Runtime tests successful' : 'Runtime tests failed',
117+
description: '${{ job.status }}' == 'success' ? 'Runtime tests successful' : 'Runtime tests failed',
106118
target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
107119
})).data;
108120
core.info(`${name} is ${state}`);
121+
122+
- name: Create output folder
123+
if: ${{ !cancelled() && (env.original_event == 'schedule' || env.original_event == 'workflow_dispatch') }}
124+
run: |
125+
rm -rf artifacts
126+
mkdir -p runtime-tests-results
127+
128+
- name: Generate badge
129+
if: ${{ !cancelled() && (env.original_event == 'schedule' || env.original_event == 'workflow_dispatch') }}
130+
uses: jaywcjlove/generated-badges@v1.0.13
131+
with:
132+
label: Runtime Tests
133+
status: ${{ job.status }}
134+
output: runtime-tests-results/badge.svg
135+
color: ${{ job.status == 'success' && 'green' || 'red' }}
136+
137+
- name: Push badge
138+
if: ${{ !cancelled() && (env.original_event == 'schedule' || env.original_event == 'workflow_dispatch') }}
139+
run: |
140+
git config user.name "github-actions[bot]"
141+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
142+
if [[ `git status --porcelain` ]]; then
143+
git add --all
144+
git commit -m "Updated runtime tests badge"
145+
git push origin HEAD:gh-pages
146+
fi

.github/workflows/tests_wokwi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ jobs:
9292
exit 1
9393
fi
9494
95+
conclusion="${{ github.event.workflow_run.conclusion }}"
96+
printf "$conclusion" >> artifacts/conclusion.txt
97+
printf "\nConclusion = "
98+
cat artifacts/conclusion.txt
99+
95100
echo "pr_num=$pr_num" >> $GITHUB_OUTPUT
96101
echo "ref=$ref" >> $GITHUB_OUTPUT
97102

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ repos:
3434
hooks:
3535
- id: clang-format
3636
types_or: [c, c++]
37+
exclude: ^.*\/build_opt\.h$
3738
- repo: https://github.com/psf/black-pre-commit-mirror
3839
rev: "22.10.0"
3940
hooks:

0 commit comments

Comments
 (0)