Skip to content

Commit d7f7df2

Browse files
committed
Merge branch 'ci/tests_refactor' into ci/refactor
2 parents c74f66f + e842a54 commit d7f7df2

24 files changed

+690
-259
lines changed

.github/scripts/find_new_boards.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ do
5454
break
5555
fi
5656
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
57-
if [ "$board_name" != "" ]
57+
if [ "$board_name" != "" ] && [ "$board_name" != "esp32_family" ]
5858
then
5959
if [ "$board_name" != "$previous_board" ]
6060
then

.github/scripts/on-push.sh

+12-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ function build(){
1010
local chunk_index=$3
1111
local chunks_cnt=$4
1212
local build_log=$5
13-
shift; shift; shift; shift; shift;
13+
local sketches_file=$6
14+
shift; shift; shift; shift; shift; shift;
1415
local sketches=$*
1516

1617
local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
@@ -23,6 +24,9 @@ function build(){
2324
if [ "$OS_IS_LINUX" == "1" ]; then
2425
args+=" -p $ARDUINO_ESP32_PATH/libraries"
2526
args+=" -i $chunk_index -m $chunks_cnt"
27+
if [ -n "$sketches_file" ]; then
28+
args+=" -f $sketches_file"
29+
fi
2630
if [ $build_log -eq 1 ]; then
2731
args+=" -l $build_log"
2832
fi
@@ -50,6 +54,7 @@ fi
5054
CHUNK_INDEX=$1
5155
CHUNKS_CNT=$2
5256
BUILD_LOG=$3
57+
SKETCHES_FILE=$4
5358
BUILD_PIO=0
5459
if [ "$#" -lt 2 ] || [ "$CHUNKS_CNT" -le 0 ]; then
5560
CHUNK_INDEX=0
@@ -94,12 +99,12 @@ if [ "$BUILD_PIO" -eq 0 ]; then
9499
fi
95100

96101
#build sketches for different targets
97-
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
98-
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
99-
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
100-
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
101-
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
102-
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
102+
build "esp32s3" $FQBN_ESP32S3 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
103+
build "esp32s2" $FQBN_ESP32S2 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
104+
build "esp32c3" $FQBN_ESP32C3 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
105+
build "esp32c6" $FQBN_ESP32C6 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
106+
build "esp32h2" $FQBN_ESP32H2 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
107+
build "esp32" $FQBN_ESP32 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
103108

104109
if [ "$BUILD_LOG" -eq 1 ]; then
105110
#remove last comma from the last JSON object

.github/scripts/on-release.sh

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ RVTC_NEW_NAME="esp-rv32"
221221
echo "Generating platform.txt..."
222222
cat "$GITHUB_WORKSPACE/platform.txt" | \
223223
sed "s/version=.*/version=$RELEASE_TAG/g" | \
224+
sed 's/tools\.esp32-arduino-libs\.path\.windows=.*//g' | \
224225
sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g' | \
225226
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
226227
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \

.github/scripts/sketch_utils.sh

+21-6
Original file line numberDiff line numberDiff line change
@@ -259,22 +259,28 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
259259
unset options
260260
}
261261

262-
function count_sketches(){ # count_sketches <path> [target]
262+
function count_sketches(){ # count_sketches <path> [target] [file]
263263
local path=$1
264264
local target=$2
265+
local file=$3
265266

266267
if [ $# -lt 1 ]; then
267268
echo "ERROR: Illegal number of parameters"
268269
echo "USAGE: ${0} count <path> [target]"
269270
fi
270271

271272
rm -rf sketches.txt
273+
touch sketches.txt
272274
if [ ! -d "$path" ]; then
273-
touch sketches.txt
274275
return 0
275276
fi
276277

277-
local sketches=$(find $path -name *.ino | sort)
278+
if [ -n "$file" ]; then
279+
local sketches=$(cat $file)
280+
else
281+
local sketches=$(find $path -name *.ino | sort)
282+
fi
283+
278284
local sketchnum=0
279285
for sketch in $sketches; do
280286
local sketchdir=$(dirname $sketch)
@@ -338,6 +344,10 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
338344
shift
339345
log_compilation=$1
340346
;;
347+
-f )
348+
shift
349+
sketches_file=$1
350+
;;
341351
* )
342352
break
343353
;;
@@ -347,7 +357,7 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
347357

348358
local xtra_opts=$*
349359

350-
if [ -z $chunk_index ] || [ -z $chunk_max ]; then
360+
if [ -z "$chunk_index" ] || [ -z "$chunk_max" ]; then
351361
echo "ERROR: Invalid chunk paramters"
352362
echo "$USAGE"
353363
exit 1
@@ -363,8 +373,13 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
363373
fi
364374

365375
set +e
366-
count_sketches "$path" "$target"
367-
local sketchcount=$?
376+
if [ -n "$sketches_file" ]; then
377+
count_sketches "$path" "$target" "$sketches_file"
378+
local sketchcount=$?
379+
else
380+
count_sketches "$path" "$target"
381+
local sketchcount=$?
382+
fi
368383
set -e
369384
local sketches=$(cat sketches.txt)
370385
rm -rf sketches.txt

.github/workflows/lib.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,13 @@
6262
"sketch_path": [
6363
"~/Arduino/libraries/WS2812FX/examples/ws2812fx_spi/ws2812fx_spi.ino"
6464
]
65+
},
66+
{
67+
"name": "ZACwire for TSic",
68+
"exclude_targets": [],
69+
"sketch_path": [
70+
"~/Arduino/libraries/ZACwire_for_TSic/examples/ReadingTwoTSICs/ReadingTwoTSICs.ino",
71+
"~/Arduino/libraries/ZACwire_for_TSic/examples/ReadSingleTSIC206/ReadSingleTSIC206.ino"
72+
]
6573
}
66-
]
74+
]

.github/workflows/publishlib.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
IFS=$'\t' read name url <<< "$artifact"
3333
gh api $url > "$name.zip"
3434
unzip -j "$name.zip" -d "temp_$name"
35-
if [[ "$name" == "pr_num" ]]; then
35+
if [[ "$name" == "pr_number" ]]; then
3636
mv "temp_$name"/* workflows
3737
else
3838
mv "temp_$name"/* libraries-report

.github/workflows/publishsizes.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Sizes Results
22

33
on:
44
workflow_run:
5-
workflows: [ESP32 Arduino CI]
5+
workflows: [Compilation Tests]
66
types:
77
- completed
88

@@ -46,7 +46,7 @@ jobs:
4646
IFS=$'\t' read name url <<< "$artifact"
4747
gh api $url > "$name.zip"
4848
unzip -j "$name.zip" -d "temp_$name"
49-
if [[ "$name" == "pr_num" ]]; then
49+
if [[ "$name" == "pr_number" ]]; then
5050
mv "temp_$name"/* sizes-report
5151
elif [[ "$name" == "pr_cli"* ]]; then
5252
mv "temp_$name"/* sizes-report/pr
@@ -63,7 +63,7 @@ jobs:
6363
uses: juliangruber/read-file-action@v1
6464
with:
6565
path: ./artifacts/sizes-report/pr_num.txt
66-
66+
6767
- name: Report results
6868
uses: P-R-O-C-H-Y/report-size-deltas@sizes_v2
6969
with:

0 commit comments

Comments
 (0)