Switch to shallow clone for all submodules

This commit is contained in:
Jerry Zhao
2021-12-16 16:58:53 -08:00
committed by abejgonzalez
parent 3435982c50
commit 349664d9e3
2 changed files with 51 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ set -ex
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh
# enter bhd repo
cd $LOCAL_CHIPYARD_DIR
# ignore the private vlsi submodules
@@ -16,15 +17,16 @@ git config submodule.vlsi/hammer-cadence-plugins.update none
git config submodule.vlsi/hammer-mentor-plugins.update none
git config submodule.vlsi/hammer-synopsys-plugins.update none
# initialize submodules and get the hashes
git submodule update --init
status=$(git submodule status)
all_names=()
search_submodule() {
echo "Running check on submodule $submodule in $dir"
# Initialize submodule and get the hashes
git submodule update --init $dir/$submodule
(cd $dir/$submodule && git fetch origin)
status=$(git submodule status)
hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*")
for branch in "${branches[@]}"
do
@@ -47,7 +49,7 @@ search () {
done
}
submodules=("cva6" "ibex" "boom" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor")
submodules=("cva6" "boom" "ibex" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor")
dir="generators"
if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ]
then