Skip to content

Commit 9f34b1b

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 5a01e73 + d8c3adc commit 9f34b1b

Some content is hidden

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

70 files changed

+1583
-368
lines changed

.github/scripts/install-arduino-core-esp32.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
2828
#git submodule update --init --recursive > /dev/null 2>&1
2929

3030
echo "Installing Platform Tools ..."
31-
cd tools && python get.py
31+
if [ "$OS_IS_WINDOWS" == "1" ]; then
32+
cd tools && ./get.exe
33+
else
34+
cd tools && python get.py
35+
fi
3236
cd $script_init_path
3337

3438
echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'"

.github/scripts/on-push.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ if [ "$BUILD_PIO" -eq 0 ]; then
108108

109109
if [ "$BUILD_LOG" -eq 1 ]; then
110110
#remove last comma from the last JSON object
111-
sed -i '$ s/.$//' "$sizes_file"
111+
sed -i '$ s/,$//' "$sizes_file"
112112
#echo end of JSON array
113113
echo "]}" >> $sizes_file
114114
fi

.github/scripts/on-release.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -421,12 +421,12 @@ fi
421421
# Upload package JSONs (temporary halted to fix json generation)
422422
echo "Uploading $PACKAGE_JSON_DEV ..."
423423
echo "Download URL: "`git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
424-
# echo "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
424+
echo "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_DEV" "$OUTPUT_DIR/$PACKAGE_JSON_DEV"`
425425
echo
426426
if [ "$RELEASE_PRE" == "false" ]; then
427427
echo "Uploading $PACKAGE_JSON_REL ..."
428428
echo "Download URL: "`git_safe_upload_asset "$OUTPUT_DIR/$PACKAGE_JSON_REL"`
429-
# echo "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_REL" "$OUTPUT_DIR/$PACKAGE_JSON_REL"`
429+
echo "Pages URL: "`git_safe_upload_to_pages "$PACKAGE_JSON_REL" "$OUTPUT_DIR/$PACKAGE_JSON_REL"`
430430
echo
431431
fi
432432

.github/scripts/set_push_chunks.sh

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/bin/bash
2+
3+
build_all=false
4+
chunks_count=0
5+
6+
if [[ $CORE_CHANGED == 'true' ]] || [[ $IS_PR != 'true' ]]; then
7+
echo "Core files changed or not a PR. Building all."
8+
build_all=true
9+
chunks_count=$MAX_CHUNKS
10+
elif [[ $LIB_CHANGED == 'true' ]]; then
11+
echo "Libraries changed. Building only affected sketches."
12+
if [[ $NETWORKING_CHANGED == 'true' ]]; then
13+
echo "Networking libraries changed. Building networking related sketches."
14+
networking_sketches="$(find libraries/WiFi -name *.ino) "
15+
networking_sketches+="$(find libraries/Ethernet -name *.ino) "
16+
networking_sketches+="$(find libraries/PPP -name *.ino) "
17+
networking_sketches+="$(find libraries/NetworkClientSecure -name *.ino) "
18+
networking_sketches+="$(find libraries/WebServer -name *.ino) "
19+
fi
20+
if [[ $FS_CHANGED == 'true' ]]; then
21+
echo "FS libraries changed. Building FS related sketches."
22+
fs_sketches="$(find libraries/SD -name *.ino) "
23+
fs_sketches+="$(find libraries/SD_MMC -name *.ino) "
24+
fs_sketches+="$(find libraries/SPIFFS -name *.ino) "
25+
fs_sketches+="$(find libraries/LittleFS -name *.ino) "
26+
fs_sketches+="$(find libraries/FFat -name *.ino) "
27+
fi
28+
sketches="$networking_sketches $fs_sketches"
29+
for file in $LIB_FILES; do
30+
if [[ $file == *.ino ]]; then
31+
# If file ends with .ino, add it to the list of sketches
32+
echo "Sketch found: $file"
33+
sketches+="$file "
34+
elif [[ $(basename $(dirname $file)) == "src" ]]; then
35+
# If file is in a src directory, find all sketches in the parent/examples directory
36+
echo "Library src file found: $file"
37+
lib=$(dirname $(dirname $file))
38+
if [[ -d $lib/examples ]]; then
39+
lib_sketches=$(find $lib/examples -name *.ino)
40+
sketches+="$lib_sketches "
41+
echo "Library sketches: $lib_sketches"
42+
fi
43+
else
44+
# If file is in a example folder but it is not a sketch, find all sketches in the current directory
45+
echo "File in example folder found: $file"
46+
sketch=$(find $(dirname $file) -name *.ino)
47+
sketches+="$sketch "
48+
echo "Sketch in example folder: $sketch"
49+
fi
50+
echo ""
51+
done
52+
fi
53+
54+
if [[ -n $sketches ]]; then
55+
# Remove duplicates
56+
sketches=$(echo $sketches | tr ' ' '\n' | sort | uniq)
57+
for sketch in $sketches; do
58+
echo $sketch >> sketches_found.txt
59+
chunks_count=$((chunks_count+1))
60+
done
61+
echo "Number of sketches found: $chunks_count"
62+
echo "Sketches:"
63+
echo "$sketches"
64+
65+
if [[ $chunks_count -gt $MAX_CHUNKS ]]; then
66+
echo "More sketches than the allowed number of chunks found. Limiting to $MAX_CHUNKS chunks."
67+
chunks_count=$MAX_CHUNKS
68+
fi
69+
fi
70+
71+
chunks='["0"'
72+
for i in $(seq 1 $(( $chunks_count - 1 )) ); do
73+
chunks+=",\"$i\""
74+
done
75+
chunks+="]"
76+
77+
echo "build_all=$build_all" >> $GITHUB_OUTPUT
78+
echo "build_libraries=$BUILD_LIBRARIES" >> $GITHUB_OUTPUT
79+
echo "build_static_sketches=$BUILD_STATIC_SKETCHES" >> $GITHUB_OUTPUT
80+
echo "build_idf=$BUILD_IDF" >> $GITHUB_OUTPUT
81+
echo "build_platformio=$BUILD_PLATFORMIO" >> $GITHUB_OUTPUT
82+
echo "chunk_count=$chunks_count" >> $GITHUB_OUTPUT
83+
echo "chunks=$chunks" >> $GITHUB_OUTPUT

.github/scripts/sketch_utils.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
192192

193193
exit_status=$?
194194
if [ $exit_status -ne 0 ]; then
195-
echo ""ERROR: Compilation failed with error code $exit_status""
195+
echo "ERROR: Compilation failed with error code $exit_status"
196196
exit $exit_status
197197
fi
198198

@@ -236,7 +236,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
236236

237237
exit_status=$?
238238
if [ $exit_status -ne 0 ]; then
239-
echo ""ERROR: Compilation failed with error code $exit_status""
239+
echo "ERROR: Compilation failed with error code $exit_status"
240240
exit $exit_status
241241
fi
242242
# $ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
@@ -398,6 +398,7 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
398398
else
399399
start_index=$(( $chunk_index * $chunk_size ))
400400
if [ "$sketchcount" -le "$start_index" ]; then
401+
echo "No sketches to build for $target in this chunk"
401402
return 0
402403
fi
403404

@@ -437,7 +438,7 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
437438
continue
438439
fi
439440
echo ""
440-
echo "Building Sketch Index $(($sketchnum - 1)) - $sketchdirname"
441+
echo "Building Sketch Index $sketchnum - $sketchdirname"
441442
build_sketch $args -s $sketchdir $xtra_opts
442443
local result=$?
443444
if [ $result -ne 0 ]; then

.github/scripts/tests_run.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,12 @@ function run_test() {
9595
printf "\033[95mpytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args\033[0m\n"
9696
bash -c "set +e; pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args; exit \$?" || result=$?
9797
printf "\n"
98-
result=$?
9998
if [ $result -ne 0 ]; then
99+
printf "\033[91mFailed test: $sketchname -- Config: $i\033[0m\n\n"
100100
error=$result
101101
fi
102102
fi
103103
done
104-
printf "Test return code: $error\n"
105104
return $error
106105
}
107106

@@ -250,7 +249,6 @@ else
250249

251250
exit_code=0
252251
run_test $target $sketch $options $erase || exit_code=$?
253-
echo "Sketch $sketch exit code: $exit_code"
254252
if [ $exit_code -ne 0 ]; then
255253
error=$exit_code
256254
fi

.github/workflows/boards.yml

+14
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ jobs:
5959
exit 1;
6060
fi
6161
62+
- name: Get libs cache
63+
uses: actions/cache@v4
64+
with:
65+
key: libs-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package/package_esp32_index.template.json', 'tools/get.py') }}
66+
path: |
67+
./tools/dist
68+
./tools/esp32-arduino-libs
69+
./tools/esptool
70+
./tools/mk*
71+
./tools/openocd-esp32
72+
./tools/riscv32-*
73+
./tools/xtensa-*
74+
6275
- name: Compile sketch
6376
uses: P-R-O-C-H-Y/compile-sketches@main
6477
with:
@@ -73,3 +86,4 @@ jobs:
7386
exit-on-fail: true
7487
sketch-paths:
7588
"- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"
89+
verbose: true

.github/workflows/build_py_tools.yml

+15-11
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ name: Build Python Tools
33
on:
44
pull_request:
55
paths:
6-
- 'tools/get.py'
7-
- 'tools/espota.py'
8-
- 'tools/gen_esp32part.py'
9-
- 'tools/gen_insights_package.py'
6+
- '.github/workflows/build_py_tools.yml'
7+
- 'tools/get.py'
8+
- 'tools/espota.py'
9+
- 'tools/gen_esp32part.py'
10+
- 'tools/gen_insights_package.py'
1011

1112
jobs:
1213
find-changed-tools:
@@ -21,6 +22,13 @@ jobs:
2122
with:
2223
fetch-depth: 2
2324
ref: ${{ github.event.pull_request.head.ref }}
25+
26+
- name: Check if checkout failed
27+
if: failure()
28+
run: |
29+
echo "Checkout failed."
30+
echo "Make sure you are using a branch inside the repository and not a fork."
31+
2432
- name: Verify Python Tools Changed
2533
uses: tj-actions/changed-files@v41
2634
id: verify-changed-files
@@ -47,7 +55,7 @@ jobs:
4755
strategy:
4856
fail-fast: false
4957
matrix:
50-
os: [windows-latest, macos-latest, ubuntu-20.04, ARM, ARM64]
58+
os: [windows-latest, macos-latest, ubuntu-20.04, ARM]
5159
include:
5260
- os: windows-latest
5361
TARGET: win64
@@ -63,10 +71,6 @@ jobs:
6371
CONTAINER: python:3.8-bullseye
6472
TARGET: arm
6573
SEPARATOR: ':'
66-
- os: ARM64
67-
CONTAINER: python:3.8-bullseye
68-
TARGET: arm64
69-
SEPARATOR: ':'
7074
container: ${{ matrix.CONTAINER }} # use python container on ARM
7175
env:
7276
DISTPATH: pytools-${{ matrix.TARGET }}
@@ -93,7 +97,7 @@ jobs:
9397
ref: ${{ github.event.pull_request.head.ref }}
9498
- name: Set up Python 3.8
9599
# Skip setting python on ARM because of missing compatibility: https://github.com/actions/setup-python/issues/108
96-
if: matrix.os != 'ARM' && matrix.os != 'ARM64'
100+
if: matrix.os != 'ARM'
97101
uses: actions/setup-python@master
98102
with:
99103
python-version: 3.8
@@ -108,7 +112,7 @@ jobs:
108112
pyinstaller --distpath ./${{ env.DISTPATH }} -F --icon=.github/pytools/espressif.ico tools/$tool.py
109113
done
110114
- name: Sign binaries
111-
if: matrix.os == 'windows-latest' && env.CERTIFICATE != '' && env.CERTIFICATE_PASSWORD != ''
115+
if: matrix.os == 'windows-latest'
112116
env:
113117
CERTIFICATE: ${{ secrets.CERTIFICATE }}
114118
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}

.github/workflows/hw.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,16 @@ jobs:
7777
run: |
7878
pip install -U pip
7979
pip install -r tests/requirements.txt --extra-index-url https://dl.espressif.com/pypi
80+
apt update
81+
apt install -y jq
8082
8183
- name: Get binaries
82-
id: cache-build-binaries
83-
uses: actions/cache/restore@v4
8484
if: ${{ steps.check-tests.outputs.enabled == 'true' }}
85+
uses: actions/download-artifact@v4
8586
with:
86-
fail-on-cache-miss: true
87-
key: tests-${{ env.id }}-bin
87+
name: tests-bin-${{ inputs.chip }}-${{ inputs.type }}
8888
path: |
89-
~/.arduino/tests/**/build*.tmp/*.bin
90-
~/.arduino/tests/**/build*.tmp/*.elf
91-
~/.arduino/tests/**/build*.tmp/*.json
89+
~/.arduino/tests
9290
9391
- name: Run Tests
9492
if: ${{ steps.check-tests.outputs.enabled == 'true' }}

.github/workflows/lib.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ jobs:
120120

121121
- name: Push to github repo
122122
run: |
123-
git config user.name github-actions
124-
git config user.email github-actions@github.com
123+
git config user.name "github-actions[bot]"
124+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
125125
git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
126126
git commit -m "Generated External Libraries Test Results"
127127
git push origin HEAD:gh-pages

.github/workflows/publishsizes-2.x.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ jobs:
3232
run: |
3333
mv master_cli_compile/*.json artifacts/sizes-report/pr/
3434
mv v2.x_cli_compile/*.json artifacts/sizes-report/master/
35-
35+
3636
- name: Report results
3737
uses: P-R-O-C-H-Y/report-size-deltas@sizes_v2
3838
with:
3939
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
4040
github-token: ${{ env.GITHUB_TOKEN }}
4141
destination-file: ${{ env.RESULT_SIZES_TEST_FILE }}
42-
42+
4343
- name: Append file with action URL
4444
run:
4545
echo "/ [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})" >> ${{ env.RESULT_SIZES_TEST_FILE }}
4646

4747
- name: Push to github repo
4848
run: |
49-
git config user.name github-actions
50-
git config user.email github-actions@github.com
49+
git config user.name "github-actions[bot]"
50+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
5151
git add ${{ env.RESULT_SIZES_TEST_FILE }}
5252
git commit -m "Generated Sizes Results (master-v2.x)"
5353
git push origin HEAD:gh-pages

0 commit comments

Comments
 (0)