From c17dac177bbd1136ff71e5ff52377625510131b5 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Fri, 22 Dec 2017 17:23:02 +0100 Subject: [PATCH] travis: Reference an existing repo for faster cloning. Signed-off-by: Tim 'mithro' Ansell --- .travis/generate-html.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis/generate-html.sh b/.travis/generate-html.sh index 34041d2..e3061e8 100755 --- a/.travis/generate-html.sh +++ b/.travis/generate-html.sh @@ -24,13 +24,18 @@ for d in html/*; do fi done +REF="" +if [ -d ../prjxray/.git ]; then + REF="--reference $(realpath $PWD/../prjxray/.git)" +fi + # Fetch Project X-ray so we can do the generation. # Try a users version of the repo first, then try the SymbiFlow version if that fails. if [ "$CURRENT_OWNER" != "SymbiFlow" ]; then - git clone https://github.com/$CURRENT_OWNER/prjxray.git $TMPDIR/prjxray || true + git clone $REF https://github.com/$CURRENT_OWNER/prjxray.git $TMPDIR/prjxray || true fi if [ ! -d $TMPDIR/prjxray/.git ]; then - git clone https://github.com/SymbiFlow/prjxray.git $TMPDIR/prjxray + git clone $REF https://github.com/SymbiFlow/prjxray.git $TMPDIR/prjxray fi # Output some information about the version of Project X-ray we are using.