update ci to exit at the end instead of partway through | fix flattened toolchain repos
This commit is contained in:
@@ -21,29 +21,66 @@ git config submodule.vlsi/hammer-synopsys-plugins.update none
|
|||||||
git submodule update --init
|
git submodule update --init
|
||||||
status=$(git submodule status)
|
status=$(git submodule status)
|
||||||
|
|
||||||
|
all_names=()
|
||||||
|
|
||||||
search () {
|
search () {
|
||||||
for submodule in "${submodules[@]}"
|
for submodule in "${submodules[@]}"
|
||||||
do
|
do
|
||||||
echo "Running check on submodule $submodule in $dir"
|
echo "Running check on submodule $submodule in $dir"
|
||||||
hash=$(echo "$status" | grep $submodule | awk '{print$1}' | grep -o "[[:alnum:]]*")
|
hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*")
|
||||||
echo "Searching for $hash in origin/master of $submodule"
|
echo "Searching for $hash in origin/$branch of $submodule"
|
||||||
git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/master" # needs init'ed submodules
|
(git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/$branch") && true # needs init'ed submodules
|
||||||
|
all_names+=("$dir/$submodule $hash $?")
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
submodules=("boom" "hwacha" "icenet" "rocket-chip" "sifive-blocks" "sifive-cache" "testchipip")
|
submodules=("boom" "hwacha" "icenet" "rocket-chip" "sifive-blocks" "sifive-cache" "testchipip")
|
||||||
dir="generators"
|
dir="generators"
|
||||||
|
branch="master"
|
||||||
|
|
||||||
search
|
search
|
||||||
|
|
||||||
submodules=("esp-tools" "riscv-tools")
|
submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests")
|
||||||
dir="toolchains"
|
dir="toolchains/esp-tools"
|
||||||
|
branch="master"
|
||||||
|
|
||||||
|
search
|
||||||
|
|
||||||
|
|
||||||
|
submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests" "riscv-gnu-toolchain-prebuilt")
|
||||||
|
dir="toolchains/riscv-tools"
|
||||||
|
branch="master"
|
||||||
|
|
||||||
|
search
|
||||||
|
|
||||||
|
# riscv-openocd doesn't use its master branch
|
||||||
|
submodules=("riscv-openocd")
|
||||||
|
dir="toolchains/riscv-tools"
|
||||||
|
branch="riscv"
|
||||||
|
|
||||||
search
|
search
|
||||||
|
|
||||||
submodules=("barstools" "chisel3" "firrtl" "torture")
|
submodules=("barstools" "chisel3" "firrtl" "torture")
|
||||||
dir="tools"
|
dir="tools"
|
||||||
|
branch="master"
|
||||||
|
|
||||||
search
|
search
|
||||||
|
|
||||||
|
# turn off verbose printing to make this easier to read
|
||||||
|
set +x
|
||||||
|
|
||||||
|
# print all result strings
|
||||||
|
for str in "${all_names[@]}";
|
||||||
|
do
|
||||||
|
echo "$str"
|
||||||
|
done
|
||||||
|
|
||||||
|
# check if there was a non-zero return code
|
||||||
|
for str in "${all_names[@]}";
|
||||||
|
do
|
||||||
|
if [ ! 0 = $(echo "$str" | awk '{print$3}') ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo "Done checking all submodules"
|
echo "Done checking all submodules"
|
||||||
|
|||||||
Reference in New Issue
Block a user