ci: Increment toolchain cache keys to clear cache
Generate hashfiles from normalized output of git-submodule status. (Interestingly, the old method also worked after submodule flattening.)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
# turn echo on and error on earliest command
|
||||
set -ex
|
||||
set -o pipefail
|
||||
|
||||
# get shared variables
|
||||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
@@ -12,10 +13,10 @@ source $SCRIPT_DIR/defaults.sh
|
||||
# enter bhd repo
|
||||
cd $LOCAL_CHIPYARD_DIR
|
||||
|
||||
# get the version of riscv-tools from the git submodule hash
|
||||
git submodule status | grep "riscv-tools" | awk '{print$1}' | grep -o "[[:alnum:]]*" >> $HOME/riscv-tools.hash
|
||||
git submodule status | grep "esp-tools" | awk '{print$1}' | grep -o "[[:alnum:]]*" >> $HOME/esp-tools.hash
|
||||
|
||||
# Use normalized output of git-submodule status as hashfile
|
||||
for tools in 'riscv-tools' 'esp-tools' ; do
|
||||
git submodule status "toolchains/${tools}" | while read -r line ; do
|
||||
echo "${line#[!0-9a-f]}"
|
||||
done > "${HOME}/${tools}.hash"
|
||||
done
|
||||
echo "Hashfile for riscv-tools and esp-tools created in $HOME"
|
||||
echo "Contents: riscv-tools:$(cat $HOME/riscv-tools.hash)"
|
||||
echo "Contents: esp-tools:$(cat $HOME/esp-tools.hash)"
|
||||
|
||||
Reference in New Issue
Block a user