File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,8 @@ for example in $idf_component_examples; do
30
30
31
31
printf " \n\033[95mBuilding %s\033[0m\n\n" " $example "
32
32
idf.py -C " $example " -DEXTRA_COMPONENT_DIRS=" $PWD /components" build
33
+
34
+ if [ " $ESP_IDF_FORCE_CLEAN " == " true" ] || [ " $ESP_IDF_FORCE_CLEAN " == " 1" ]; then
35
+ idf.py -C " $example " clean
36
+ fi
33
37
done
Original file line number Diff line number Diff line change @@ -266,12 +266,20 @@ function build_sketch { # build_sketch <ide_path> <user_path> <path-to-ino> [ext
266
266
267
267
curroptions=$( echo " $currfqbn " | cut -d' :' -f4)
268
268
currfqbn=$( echo " $currfqbn " | cut -d' :' -f1-3)
269
+
270
+ # Add --clean flag if ARDUINO_CLI_FORCE_CLEAN is set to 1
271
+ clean_flag=" "
272
+ if [ " $ARDUINO_CLI_FORCE_CLEAN " == " true" ] || [ " $ARDUINO_CLI_FORCE_CLEAN " == " 1" ]; then
273
+ clean_flag=" --clean"
274
+ fi
275
+
269
276
" $ide_path " /arduino-cli compile \
270
277
--fqbn " $currfqbn " \
271
278
--board-options " $curroptions " \
272
279
--warnings " all" \
273
280
--build-property " compiler.warning_flags.all=-Wall -Werror=all -Wextra" \
274
281
--build-path " $build_dir " \
282
+ $clean_flag \
275
283
" ${xtra_opts[@]} " " ${sketchdir} " \
276
284
2>&1 | tee " $output_file "
277
285
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ jobs:
110
110
enable-warnings-report : false
111
111
cli-compile-flags : |
112
112
- --warnings="all"
113
+ - --clean
113
114
exit-on-fail : ${{ github.event_name == 'pull_request' }}
114
115
sketch-paths : " - ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"
115
116
verbose : true
Original file line number Diff line number Diff line change @@ -167,6 +167,8 @@ jobs:
167
167
if : ${{ needs.gen-chunks.outputs.build_all == 'true' || needs.gen-chunks.outputs.build_libraries == 'true' }}
168
168
needs : gen-chunks
169
169
runs-on : ubuntu-latest
170
+ env :
171
+ ARDUINO_CLI_FORCE_CLEAN : ${{ github.event_name == 'schedule' || (github.event_name == 'pull_request' && needs.gen-chunks.outputs.build_all != 'true') || inputs.run_codeql }}
170
172
strategy :
171
173
fail-fast : false
172
174
matrix :
@@ -266,6 +268,8 @@ jobs:
266
268
needs : gen-chunks
267
269
if : ${{ needs.gen-chunks.outputs.build_all == 'true' || needs.gen-chunks.outputs.build_static_sketches == 'true' }}
268
270
runs-on : ${{ matrix.os }}
271
+ env :
272
+ ARDUINO_CLI_FORCE_CLEAN : ${{ github.event_name == 'schedule' || (github.event_name == 'pull_request' && needs.gen-chunks.outputs.build_all != 'true') || inputs.run_codeql }}
269
273
strategy :
270
274
fail-fast : false
271
275
matrix :
@@ -321,6 +325,8 @@ jobs:
321
325
needs.gen-chunks.outputs.build_libraries == 'true' ||
322
326
needs.gen-chunks.outputs.build_idf == 'true'
323
327
runs-on : ubuntu-latest
328
+ env :
329
+ ESP_IDF_FORCE_CLEAN : ${{ github.event_name == 'schedule' || (github.event_name == 'pull_request' && needs.gen-chunks.outputs.build_all != 'true') || inputs.run_codeql }}
324
330
strategy :
325
331
fail-fast : false
326
332
matrix :
You can’t perform that action at this time.
0 commit comments