Skip to content

Commit bb422a2

Browse files
committed
Update on-push.sh
1 parent 9302910 commit bb422a2

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

.github/scripts/on-push.sh

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,28 @@ if [ "$BUILD_PIO" -eq 0 ]; then
8686
$ARDUINO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino\
8787
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
8888
"
89-
#create sizes_file and echo start of JSON array with "boards" key
89+
#create sizes_file
9090
sizes_file="$GITHUB_WORKSPACE/cli_compile_$CHUNK_INDEX.json"
91-
echo "{\"boards\": [" > $sizes_file
9291

93-
#build sketches for different targets
94-
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
95-
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
96-
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
97-
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
98-
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
99-
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
100-
101-
102-
echo "Debug(board) - removing last comma from the last JSON object"
103-
104-
#remove last comma from the last JSON object
105-
sed -i '$ s/.$//' "$sizes_file"
106-
#echo end of JSON array
107-
echo "]}" >> $sizes_file
92+
if [ "$BUILD_LOG" -eq 1 ]; then
93+
#create sizes_file and echo start of JSON array with "boards" key
94+
echo "{\"boards\": [" > $sizes_file
95+
fi
10896

97+
#build sketches for different targets
98+
build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
99+
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
100+
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
101+
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
102+
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
103+
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $BUILD_LOG $SKETCHES_ESP32
104+
105+
if [ "$BUILD_LOG" -eq 1 ]; then
106+
#remove last comma from the last JSON object
107+
sed -i '$ s/.$//' "$sizes_file"
108+
#echo end of JSON array
109+
echo "]}" >> $sizes_file
110+
fi
109111
else
110112
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
111113
# PlatformIO ESP32 Test

0 commit comments

Comments
 (0)