Skip to content

Commit 1006c8f

Browse files
committed
fix
1 parent a183980 commit 1006c8f

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

.github/scripts/on-push-idf.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,8 @@ for example in $idf_component_examples; do
3030

3131
printf "\n\033[95mBuilding %s\033[0m\n\n" "$example"
3232
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
3337
done

.github/scripts/sketch_utils.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,20 @@ function build_sketch { # build_sketch <ide_path> <user_path> <path-to-ino> [ext
266266

267267
curroptions=$(echo "$currfqbn" | cut -d':' -f4)
268268
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+
269276
"$ide_path"/arduino-cli compile \
270277
--fqbn "$currfqbn" \
271278
--board-options "$curroptions" \
272279
--warnings "all" \
273280
--build-property "compiler.warning_flags.all=-Wall -Werror=all -Wextra" \
274281
--build-path "$build_dir" \
282+
$clean_flag \
275283
"${xtra_opts[@]}" "${sketchdir}" \
276284
2>&1 | tee "$output_file"
277285

.github/workflows/boards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
enable-warnings-report: false
111111
cli-compile-flags: |
112112
- --warnings="all"
113+
- --clean
113114
exit-on-fail: ${{ github.event_name == 'pull_request' }}
114115
sketch-paths: "- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"
115116
verbose: true

.github/workflows/push.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ jobs:
167167
if: ${{ needs.gen-chunks.outputs.build_all == 'true' || needs.gen-chunks.outputs.build_libraries == 'true' }}
168168
needs: gen-chunks
169169
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 }}
170172
strategy:
171173
fail-fast: false
172174
matrix:
@@ -266,6 +268,8 @@ jobs:
266268
needs: gen-chunks
267269
if: ${{ needs.gen-chunks.outputs.build_all == 'true' || needs.gen-chunks.outputs.build_static_sketches == 'true' }}
268270
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 }}
269273
strategy:
270274
fail-fast: false
271275
matrix:
@@ -321,6 +325,8 @@ jobs:
321325
needs.gen-chunks.outputs.build_libraries == 'true' ||
322326
needs.gen-chunks.outputs.build_idf == 'true'
323327
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 }}
324330
strategy:
325331
fail-fast: false
326332
matrix:

0 commit comments

Comments
 (0)