From ffdf001eeebaff96ada9dac0c55af5b47ea3709a Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 10 Mar 2022 15:10:15 -0800 Subject: [PATCH] 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 --- scripts/xtensa-build-zephyr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 04ad5fb99..e33d7db80 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -278,7 +278,7 @@ def west_init_update(): link back to sof/""" global west_top, SOF_TOP 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", "checkout", "FETCH_HEAD"], check=True, cwd=zephyr_dir) execute_command(["git", "-C", str(zephyr_dir), "--no-pager", "log", "--oneline", "--graph",