Skip to content

Commit 3554927

Browse files
authored
Merge branch 'master' into release/v3.1.x
2 parents 6e88445 + 3502b9c commit 3554927

File tree

23 files changed

+2463
-50
lines changed

23 files changed

+2463
-50
lines changed

Diff for: .github/scripts/find_new_boards.sh

+23-44
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,39 @@
22

33
# Get inputs from command
44
owner_repository=$1
5-
pr_number=$2
5+
base_ref=$2
66

7-
url="https://api.github.com/repos/$owner_repository/pulls/$pr_number/files"
8-
echo $url
7+
# Download the boards.txt file from the base branch
8+
curl -L -o boards_base.txt https://raw.githubusercontent.com/$owner_repository/$base_ref/boards.txt
99

10-
# Get changes in boards.txt file from PR
11-
Patch=$(curl $url | jq -r '.[] | select(.filename == "boards.txt") | .patch ')
10+
# Compare boards.txt file in the repo with the modified file from PR
11+
diff=$(diff -u boards_base.txt boards.txt)
1212

13-
# Extract only changed lines number and count
14-
substring_patch=$(echo "$Patch" | grep -o '@@[^@]*@@')
15-
16-
params_array=()
13+
# Check if the diff is empty
14+
if [ -z "$diff" ]
15+
then
16+
echo "No changes in boards.txt file"
17+
echo "FQBNS="
18+
exit 0
19+
fi
1720

18-
IFS=$'\n' read -d '' -ra params <<< $(echo "$substring_patch" | grep -oE '[-+][0-9]+,[0-9]+')
21+
# Extract added or modified lines (lines starting with '+' or '-')
22+
modified_lines=$(echo "$diff" | grep -E '^[+-][^+-]')
1923

20-
for param in "${params[@]}"
21-
do
22-
echo "The parameter is $param"
23-
params_array+=("$param")
24-
done
24+
# Print the modified lines for debugging
25+
echo "Modified lines:"
26+
echo "$modified_lines"
2527

2628
boards_array=()
2729
previous_board=""
28-
file="boards.txt"
2930

30-
# Loop through boards.txt file and extract all boards that were added
31-
for (( c=0; c<${#params_array[@]}; c+=2 ))
31+
# Extract board names from the modified lines, and add them to the boards_array
32+
while read -r line
3233
do
33-
deletion_count=$( echo "${params_array[c]}" | cut -d',' -f2 | cut -d' ' -f1 )
34-
addition_line=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f1 )
35-
addition_count=$( echo "${params_array[c+1]}" | cut -d'+' -f2 | cut -d',' -f2 | cut -d' ' -f1 )
36-
addition_end=$(($addition_line+$addition_count))
37-
38-
addition_line=$(($addition_line + 3))
39-
addition_end=$(($addition_end - $deletion_count))
40-
41-
echo $addition_line
42-
echo $addition_end
43-
44-
i=0
45-
46-
while read -r line
47-
do
48-
i=$((i+1))
49-
if [ $i -lt $addition_line ]
50-
then
51-
continue
52-
elif [ $i -gt $addition_end ]
53-
then
54-
break
55-
fi
5634
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
57-
if [ "$board_name" != "" ] && [ "$board_name" != "esp32_family" ]
35+
# remove + or - from the board name at the beginning
36+
board_name=$(echo "$board_name" | sed 's/^[+-]//')
37+
if [ "$board_name" != "" ] && [ "$board_name" != "+" ] && [ "$board_name" != "-" ] && [ "$board_name" != "esp32_family" ]
5838
then
5939
if [ "$board_name" != "$previous_board" ]
6040
then
@@ -63,8 +43,7 @@ do
6343
echo "Added 'espressif:esp32:$board_name' to array"
6444
fi
6545
fi
66-
done < "$file"
67-
done
46+
done <<< "$modified_lines"
6847

6948
# Create JSON like string with all boards found and pass it to env variable
7049
board_count=${#boards_array[@]}

Diff for: .github/workflows/boards.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Get board name
3131
run:
32-
bash .github/scripts/find_new_boards.sh ${{ github.repository }} ${{github.event.number}}
32+
bash .github/scripts/find_new_boards.sh ${{ github.repository }} ${{github.base_ref}}
3333

3434
test-boards:
3535
needs: find-boards
@@ -42,6 +42,7 @@ jobs:
4242
name: "espressif:esp32"
4343
4444
strategy:
45+
fail-fast: false
4546
matrix: ${{ fromJson(needs.find-boards.outputs.fqbns) }}
4647

4748
steps:

Diff for: .github/workflows/push.yml

+16
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,20 @@ on:
2121
- 'idf_component.yml'
2222
- 'Kconfig.projbuild'
2323
- 'package.json'
24+
- 'CMakeLists.txt'
2425
- '.github/workflows/push.yml'
2526
- '.github/scripts/**'
2627
- '!.github/scripts/find_*'
2728
- '!.github/scripts/on-release.sh'
2829
- '!.github/scripts/tests_*'
2930
- '!.github/scripts/upload_*'
31+
- "variants/esp32/**/*"
32+
- "variants/esp32s2/**/*"
33+
- "variants/esp32s3/**/*"
34+
- "variants/esp32c2/**/*"
35+
- "variants/esp32c3/**/*"
36+
- "variants/esp32c6/**/*"
37+
- "variants/esp32h2/**/*"
3038

3139
concurrency:
3240
group: build-${{github.event.pull_request.number || github.ref}}
@@ -74,6 +82,12 @@ jobs:
7482
- '!tools/platformio-build.py'
7583
- 'platform.txt'
7684
- 'programmers.txt'
85+
- "variants/esp32/**/*"
86+
- "variants/esp32s2/**/*"
87+
- "variants/esp32s3/**/*"
88+
- "variants/esp32c3/**/*"
89+
- "variants/esp32c6/**/*"
90+
- "variants/esp32h2/**/*"
7791
libraries:
7892
- 'libraries/**/examples/**'
7993
- 'libraries/**/src/**'
@@ -92,6 +106,8 @@ jobs:
92106
idf:
93107
- 'idf_component.yml'
94108
- 'Kconfig.projbuild'
109+
- 'CMakeLists.txt'
110+
- "variants/esp32c2/**/*"
95111
platformio:
96112
- 'package.json'
97113
- '.github/scripts/install-platformio-esp32.sh'

Diff for: CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ set(ARDUINO_LIBRARY_HTTPUpdate_SRCS libraries/HTTPUpdate/src/HTTPUpdate.cpp)
159159
set(ARDUINO_LIBRARY_Insights_SRCS libraries/Insights/src/Insights.cpp)
160160

161161
set(ARDUINO_LIBRARY_LittleFS_SRCS libraries/LittleFS/src/LittleFS.cpp)
162+
set(ARDUINO_LIBRARY_LittleFS_REQUIRES joltwallet__littlefs)
162163

163164
set(ARDUINO_LIBRARY_NetBIOS_SRCS libraries/NetBIOS/src/NetBIOS.cpp)
164165

0 commit comments

Comments
 (0)