From 672dabe67dde537c558fa024d44811800cbe2b28 Mon Sep 17 00:00:00 2001 From: Huaqi Fang <578567190@qq.com> Date: Fri, 29 Dec 2023 22:50:11 +0800 Subject: [PATCH] ci: Fix gd openocd caching Signed-off-by: Huaqi Fang <578567190@qq.com> --- .github/prepare_tools.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/prepare_tools.py b/.github/prepare_tools.py index c85a036..97d6478 100644 --- a/.github/prepare_tools.py +++ b/.github/prepare_tools.py @@ -139,7 +139,7 @@ def setup_gd_openocd(toolsdir, gd_openocd_url, system_value, gd_openocd_folder_n # Download and extract gd32-openocd to a temporary folder tools_folder = toolsdir temp_folder = os.path.join(tools_folder, "temp_gd_openocd") - download_and_extract(gd_openocd_url, temp_folder) + download_and_extract(gd_openocd_url, temp_folder, reuse) # Rename the extracted folder to gd_openocd renamed_folder = os.path.join(temp_folder, gd_openocd_folder_name) @@ -224,6 +224,12 @@ def install_pio_packages(nsdk_url="https://github.com/Nuclei-Software/nuclei-sdk args = parser.parse_args() needinstall = True + if os.path.isdir(PREBLT_CACHE): + print("Prebuilt tool download cache directory existed!") + print("Content in this directory: %s" % (os.listdir(PREBLT_CACHE))) + else: + print("No prebuilt tool download cache found!") + if os.path.isdir(PREBLT_TOOLS): needinstall = False print("%s existed, maybe tools already installed!" % (PREBLT_TOOLS))