Skip to content

Commit f050ec8

Browse files
committed
Update on-push.sh
1 parent 38ee3e7 commit f050ec8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/scripts/on-push.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,26 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7777
$ARDUINO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino\
7878
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
7979
"
80+
#create sizes_file and echo start of JSON array with "boards" key
81+
sizes_file="$GITHUB_WORKSPACE/cli_compile_$CHUNK_INDEX.json"
82+
echo "{\"boards\": [" > $sizes_file
8083

84+
#build sketches for different targets
8185
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8286
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8387
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8488
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8589
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
8690
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
91+
92+
93+
echo "Debug(board) - removing last comma from the last JSON object"
94+
95+
#remove last comma from the last JSON object
96+
sed -i '$ s/.$//' "$sizes_file"
97+
#echo end of JSON array
98+
echo "]}" >> $sizes_file
99+
87100
else
88101
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
89102
# PlatformIO ESP32 Test

0 commit comments

Comments
 (0)