Skip to content

Commit 8651c52

Browse files
committed
Update sketch_utils.sh
1 parent 990a6e3 commit 8651c52

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/scripts/sketch_utils.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
2727
shift
2828
sketchdir=$1
2929
;;
30+
-i )
31+
shift
32+
chunk_index=$1
33+
;;
3034
* )
3135
break
3236
;;
@@ -140,10 +144,10 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
140144
build_dir="$HOME/.arduino/tests/$sketchname/build.tmp"
141145
fi
142146

143-
echo "Chunk index = $CHUNK_INDEX"
147+
echo "Chunk index = $chunk_index"
144148

145149
log_file="$HOME/.arduino/cli_compile_output.txt"
146-
sizes_file="$GITHUB_WORKSPACE/cli_compile_$CHUNK_INDEX.json"
150+
sizes_file="$GITHUB_WORKSPACE/cli_compile_$chunk_index.json"
147151

148152
echo "Sizes file = $sizes_file"
149153

@@ -391,7 +395,7 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
391395
echo "End Sketch : $end_index"
392396

393397
local sketchnum=0
394-
args+=" -ai $ide_path -au $user_path"
398+
args+=" -ai $ide_path -au $user_path -i $chunk_index"
395399
for sketch in $sketches; do
396400
local sketchdir=$(dirname $sketch)
397401
local sketchdirname=$(basename $sketchdir)

0 commit comments

Comments
 (0)