mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-25 06:13:56 +08:00
[action/ci] 把每次编译结果上传到github (#10135)
ToolsCI / Tools (push) Waiting to run
AutoTestCI / components/cpp11 (push) Waiting to run
AutoTestCI / kernel/atomic (push) Waiting to run
AutoTestCI / kernel/atomic/riscv64 (push) Waiting to run
AutoTestCI / kernel/atomic_c11 (push) Waiting to run
AutoTestCI / kernel/atomic_c11/riscv64 (push) Waiting to run
AutoTestCI / kernel/device (push) Waiting to run
AutoTestCI / kernel/ipc (push) Waiting to run
AutoTestCI / kernel/irq (push) Waiting to run
AutoTestCI / kernel/mem (push) Waiting to run
AutoTestCI / kernel/mem/riscv64 (push) Waiting to run
AutoTestCI / kernel/thread (push) Waiting to run
AutoTestCI / kernel/timer (push) Waiting to run
AutoTestCI / rtsmart/aarch64 (push) Waiting to run
AutoTestCI / rtsmart/arm (push) Waiting to run
AutoTestCI / rtsmart/riscv64 (push) Waiting to run
AutoTestCI / components/utest (push) Waiting to run
RT-Thread BSP Static Build Check / ESP32C3 (push) Waiting to run
RT-Thread BSP Static Build Check / Infineon_TI_microchip (push) Waiting to run
RT-Thread BSP Static Build Check / RT-Thread Online Packages (STM32F407 RT-Spark) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino_Arduino Libraries (Raspberry Pico) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino_Arduino Libraries (STM32F412 Nucleo) (push) Waiting to run
RT-Thread BSP Static Build Check / aarch64 (push) Waiting to run
RT-Thread BSP Static Build Check / at32_hc32_ht32 (push) Waiting to run
RT-Thread BSP Static Build Check / gd32_n32_apm32 (push) Waiting to run
RT-Thread BSP Static Build Check / hpmicro (push) Waiting to run
RT-Thread BSP Static Build Check / i386-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / llvm-arm (push) Waiting to run
RT-Thread BSP Static Build Check / mips (push) Waiting to run
RT-Thread BSP Static Build Check / nordic(yml) (push) Waiting to run
RT-Thread BSP Static Build Check / nuvoton (push) Waiting to run
RT-Thread BSP Static Build Check / nxp_renesas (push) Waiting to run
RT-Thread BSP Static Build Check / others_ft32_mm32_acm32 (push) Waiting to run
RT-Thread BSP Static Build Check / riscv-none (push) Waiting to run
RT-Thread BSP Static Build Check / riscv64-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / simulator (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f2_f4 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f7_g0_h7_mp15_u5_h5_wb5 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32f0_f1 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32l4 (push) Waiting to run
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Waiting to run
pkgs_test / change (push) Has been skipped
utest_auto_run / A9-rtsmart :default.cfg (push) Waiting to run
utest_auto_run / RISCV-rtsmart :default.cfg (push) Waiting to run
utest_auto_run / AARCH64 :default.cfg (push) Waiting to run
utest_auto_run / A9 :default.cfg (push) Waiting to run
utest_auto_run / A9-smp :default.cfg (push) Waiting to run
utest_auto_run / RISCV :default.cfg (push) Waiting to run
ToolsCI / Tools (push) Waiting to run
AutoTestCI / components/cpp11 (push) Waiting to run
AutoTestCI / kernel/atomic (push) Waiting to run
AutoTestCI / kernel/atomic/riscv64 (push) Waiting to run
AutoTestCI / kernel/atomic_c11 (push) Waiting to run
AutoTestCI / kernel/atomic_c11/riscv64 (push) Waiting to run
AutoTestCI / kernel/device (push) Waiting to run
AutoTestCI / kernel/ipc (push) Waiting to run
AutoTestCI / kernel/irq (push) Waiting to run
AutoTestCI / kernel/mem (push) Waiting to run
AutoTestCI / kernel/mem/riscv64 (push) Waiting to run
AutoTestCI / kernel/thread (push) Waiting to run
AutoTestCI / kernel/timer (push) Waiting to run
AutoTestCI / rtsmart/aarch64 (push) Waiting to run
AutoTestCI / rtsmart/arm (push) Waiting to run
AutoTestCI / rtsmart/riscv64 (push) Waiting to run
AutoTestCI / components/utest (push) Waiting to run
RT-Thread BSP Static Build Check / ESP32C3 (push) Waiting to run
RT-Thread BSP Static Build Check / Infineon_TI_microchip (push) Waiting to run
RT-Thread BSP Static Build Check / RT-Thread Online Packages (STM32F407 RT-Spark) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino_Arduino Libraries (Raspberry Pico) (push) Waiting to run
RT-Thread BSP Static Build Check / RTduino_Arduino Libraries (STM32F412 Nucleo) (push) Waiting to run
RT-Thread BSP Static Build Check / aarch64 (push) Waiting to run
RT-Thread BSP Static Build Check / at32_hc32_ht32 (push) Waiting to run
RT-Thread BSP Static Build Check / gd32_n32_apm32 (push) Waiting to run
RT-Thread BSP Static Build Check / hpmicro (push) Waiting to run
RT-Thread BSP Static Build Check / i386-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / llvm-arm (push) Waiting to run
RT-Thread BSP Static Build Check / mips (push) Waiting to run
RT-Thread BSP Static Build Check / nordic(yml) (push) Waiting to run
RT-Thread BSP Static Build Check / nuvoton (push) Waiting to run
RT-Thread BSP Static Build Check / nxp_renesas (push) Waiting to run
RT-Thread BSP Static Build Check / others_ft32_mm32_acm32 (push) Waiting to run
RT-Thread BSP Static Build Check / riscv-none (push) Waiting to run
RT-Thread BSP Static Build Check / riscv64-unknown (push) Waiting to run
RT-Thread BSP Static Build Check / simulator (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f2_f4 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32_f7_g0_h7_mp15_u5_h5_wb5 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32f0_f1 (push) Waiting to run
RT-Thread BSP Static Build Check / stm32l4 (push) Waiting to run
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Waiting to run
pkgs_test / change (push) Has been skipped
utest_auto_run / A9-rtsmart :default.cfg (push) Waiting to run
utest_auto_run / RISCV-rtsmart :default.cfg (push) Waiting to run
utest_auto_run / AARCH64 :default.cfg (push) Waiting to run
utest_auto_run / A9 :default.cfg (push) Waiting to run
utest_auto_run / A9-smp :default.cfg (push) Waiting to run
utest_auto_run / RISCV :default.cfg (push) Waiting to run
* [action/ci] 把每次编译结果上传到github * [fix] * add output * fix * fixthe attach_file_name * fix * fix name * [action] 更新一下toolchain的版本号 * [bsp/stm32] hex 生成 * Update type.h
This commit is contained in:
@@ -36,7 +36,7 @@ def run_cmd(cmd, output_info=True):
|
||||
return output_str_list, res
|
||||
|
||||
|
||||
def build_bsp(bsp, scons_args=''):
|
||||
def build_bsp(bsp, scons_args='',name='default'):
|
||||
"""
|
||||
build bsp.
|
||||
|
||||
@@ -57,6 +57,7 @@ def build_bsp(bsp, scons_args=''):
|
||||
"""
|
||||
success = True
|
||||
os.chdir(rtt_root)
|
||||
os.makedirs(f'{rtt_root}/output/bsp/{bsp}', exist_ok=True)
|
||||
if os.path.exists(f"{rtt_root}/bsp/{bsp}/Kconfig"):
|
||||
os.chdir(rtt_root)
|
||||
run_cmd(f'scons -C bsp/{bsp} --pyconfig-silent', output_info=False)
|
||||
@@ -67,18 +68,23 @@ def build_bsp(bsp, scons_args=''):
|
||||
|
||||
nproc = multiprocessing.cpu_count()
|
||||
os.chdir(rtt_root)
|
||||
cmd = f'scons -C bsp/{bsp} -j{nproc} {scons_args} --debug=time'
|
||||
cmd = f'scons -C bsp/{bsp} -j{nproc} {scons_args}' # --debug=time for debug time
|
||||
__, res = run_cmd(cmd, output_info=True)
|
||||
|
||||
if res != 0:
|
||||
success = False
|
||||
else:
|
||||
#拷贝当前的文件夹下面的所有以elf结尾的文件拷贝到rt-thread/output文件夹下
|
||||
import glob
|
||||
# 拷贝编译生成的文件到output目录,文件拓展为 elf,bin,hex
|
||||
for file_type in ['*.elf', '*.bin', '*.hex']:
|
||||
files = glob.glob(f'{rtt_root}/bsp/{bsp}/{file_type}')
|
||||
for file in files:
|
||||
shutil.copy(file, f'{rtt_root}/output/bsp/{bsp}/{name.replace("/", "_")}.{file_type[2:]}')
|
||||
|
||||
os.chdir(f'{rtt_root}/bsp/{bsp}')
|
||||
run_cmd('scons -c', output_info=False)
|
||||
|
||||
#pkg_dir = os.path.join(rtt_root, 'bsp', bsp, 'packages')
|
||||
#shutil.rmtree(pkg_dir, ignore_errors=True)
|
||||
|
||||
return success
|
||||
|
||||
|
||||
@@ -145,7 +151,7 @@ def build_bsp_attachconfig(bsp, attach_file):
|
||||
|
||||
scons_args = check_scons_args(attach_path)
|
||||
|
||||
res = build_bsp(bsp, scons_args)
|
||||
res = build_bsp(bsp, scons_args,name=attach_file)
|
||||
|
||||
shutil.copyfile(config_bacakup, config_file)
|
||||
os.remove(config_bacakup)
|
||||
@@ -220,7 +226,7 @@ if __name__ == "__main__":
|
||||
scons_arg.append(line)
|
||||
scons_arg_str=' '.join(scons_arg) if scons_arg else ' '
|
||||
print(f"::group::\tCompiling yml project: =={count}==={name}=scons_arg={scons_arg_str}==")
|
||||
res = build_bsp(bsp, scons_arg_str)
|
||||
res = build_bsp(bsp, scons_arg_str,name=name)
|
||||
if not res:
|
||||
print(f"::error::build {bsp} {name} failed.")
|
||||
add_summary(f'\t- ❌ build {bsp} {name} failed.')
|
||||
|
||||
Reference in New Issue
Block a user