Skip to content

Commit

Permalink
ci: Fix gd openocd caching
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <578567190@qq.com>
  • Loading branch information
fanghuaqi committed Dec 29, 2023
1 parent db35a1e commit 672dabe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/prepare_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 672dabe

Please # to comment.