From 3e570aa219dbcc57646be035e9ea384fb7eab02d Mon Sep 17 00:00:00 2001 From: Lup Yuen Lee Date: Sun, 19 Apr 2026 08:16:10 +0800 Subject: [PATCH] CI: Remove corrupted downloads for build retry We have implemented CI Build Retry for mitigating Download Failures. But right now it will reuse any Corrupted Downloads (instead of deleting them), which will cause CI Build Retry to fail repeatedly: https://github.com/apache/nuttx/actions/runs/24611381081/job/71966407518#step:10:627 ``` Ignored files: system/argtable3/v3.2.0.7402e6e.tar.gz gzip: stdin: not in gzip format make[3]: *** [Makefile:76: argtable3] Error 2 ``` This PR proposes to change `git clean -fd` to `git clean -xfdq`. This will remove any Corrupted Downloads, preventing their reuse for CI Build Retry: ```bash ## Simulate a corrupted download for argtable3 $ tools/configure.sh qemu-armv8a/netnsh $ Downloading v3.2.0.7402e6e.tar.gz--argtable3 ## Press Ctrl-C to stop the build ## `git clean -fd` won't remove the corrupted download $ cd ../apps $ git clean -fd $ find . -name "v3.2.0.7402e6e.tar.gz" ./system/argtable3/v3.2.0.7402e6e.tar.gz ## `git clean -xfdq` removes the corrupted download $ git clean -xfdq $ find . -name "v3.2.0.7402e6e.tar.gz" ## Corrupted download is deleted correctly ``` `git clean -xfdq` is also found in the same testbuild script, so we are using it consistently: https://github.com/apache/nuttx/blob/12e8f92a282fac58e0dfff587ea3d9502e4804c0/tools/testbuild.sh#L286-L291 Signed-off-by: Lup Yuen Lee --- tools/testbuild.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testbuild.sh b/tools/testbuild.sh index 16bbeeae8ee..420d553a035 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -599,15 +599,15 @@ function retrytest { break else # Build Failed: Clean up any corrupted downloads, don't reuse - git -C $nuttx clean -fd - git -C $APPSDIR clean -fd + git -C $nuttx clean -xfdq + git -C $APPSDIR clean -xfdq pushd $nuttx ; git status ; popd pushd $APPSDIR ; git status ; popd fi # If this is Final Retry: Don't retry subsequent builds if [ $i -eq $maxbuilds ]; then - maxbuilds=1 + maxbuilds=1 break fi