riscv-collab / riscv-gnu-toolchain

GNU toolchain for RISC-V, including GCC
Other
3.56k stars 1.17k forks source link

reduce submodule clone time and size using depth option #1616

Closed karaketir16 closed 1 week ago

karaketir16 commented 1 week ago

This will decrease the required clone size and so reduce the overall build time.

karaketir16 commented 1 week ago

Let's wait for the workflow completion for comparision

karaketir16 commented 1 week ago

Some remotes don’t support cloning with the --depth 1 option. I’ll investigate.

karaketir16 commented 1 week ago

Comparison of Cloning the binutils Submodule

Without --depth 1:
image

With --depth 1:
image

Results:

Note: I did not wait this time for cloning of the full history. here an old log from workflow: image

TommyMurphyTM1234 commented 1 week ago

I presume that you've seen this existing open PR already?

Some remotes don’t support cloning with the --depth 1 option. I’ll investigate.

I thought that uClibc was the only one here that had a problem with it?

karaketir16 commented 1 week ago

No, I did not see other pull request. I wrote a script, thats try full clone, if shallow fails.

mickflemm commented 1 week ago

This is already done here, for all modules including uclibc: https://github.com/riscv-collab/riscv-gnu-toolchain/pull/1608/commits/efc7cc9c828050d99125b0b6054a4ab80901adc8