xtensa-build-zephyr.py: clone zephyr with --depth 5

This restores the performance of the original shell script and makes a
big difference in CI. CI clones over and over again whereas developers
clone rarely and can run a simple git fetch --unshallow.

Don't use --depth 0 to provide more context in the logs and also make it
more obvious that this is a shallow clone and not just git log -n 1.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2022-03-10 15:10:15 -08:00 committed by Liam Girdwood
parent 5a80db78af
commit ffdf001eee
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ def west_init_update():
link back to sof/""" link back to sof/"""
global west_top, SOF_TOP global west_top, SOF_TOP
zephyr_dir = pathlib.Path(west_top, "zephyr") zephyr_dir = pathlib.Path(west_top, "zephyr")
execute_command(["git", "clone", args.url, str(zephyr_dir)], check=True, timeout=1200) execute_command(["git", "clone", "--depth", "5", args.url, str(zephyr_dir)], check=True, timeout=1200)
execute_command(["git", "fetch", "origin", args.zephyr_ref], check=True, timeout=300, cwd=zephyr_dir) execute_command(["git", "fetch", "origin", args.zephyr_ref], check=True, timeout=300, cwd=zephyr_dir)
execute_command(["git", "checkout", "FETCH_HEAD"], check=True, cwd=zephyr_dir) execute_command(["git", "checkout", "FETCH_HEAD"], check=True, cwd=zephyr_dir)
execute_command(["git", "-C", str(zephyr_dir), "--no-pager", "log", "--oneline", "--graph", execute_command(["git", "-C", str(zephyr_dir), "--no-pager", "log", "--oneline", "--graph",