mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-09 20:59:23 +00:00
Add debugging statements to figure where the CI workflow is erroring
This commit is contained in:
10
.github/workflows/stack_size.yml
vendored
10
.github/workflows/stack_size.yml
vendored
@@ -54,6 +54,8 @@ jobs:
|
||||
sha256sum $bin
|
||||
done
|
||||
|
||||
echo "Verifying artifacts are equivalent"
|
||||
|
||||
sha256() {
|
||||
sha256sum "$1" | cut -d' ' -f1
|
||||
}
|
||||
@@ -66,6 +68,8 @@ jobs:
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Verified artifacts are equivalent"
|
||||
|
||||
read_stack() {
|
||||
STACK_INFO=$(readelf "$1" -l | grep STACK -A1)
|
||||
MEMSZ=$(echo "$STACK_INFO" | tail -n1 | sed -E s/^[[:space:]]*//g | cut -f2 -d' ')
|
||||
@@ -77,15 +81,21 @@ jobs:
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "Verified \`read_stack\` agrees the binary started with 0"
|
||||
|
||||
UPDATED_STACK=$(read_stack monerod-chelf)
|
||||
if [ "$UPDATED_STACK" -ne "$STACK" ]; then
|
||||
echo "Updated \`PT_GNU_STACK\` ($UPDATED_STACK) wasn't 8 MB ($STACK)"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
echo "Verified \`read_stack\` agrees the binary's stack is now 8 MB"
|
||||
|
||||
# Only one byte should be different due to the bit pattern of 8 MB
|
||||
BYTES_DIFFERENT=$(cmp -l monerod monerod-chelf | wc -l)
|
||||
if [ "$BYTES_DIFFERENT" -ne 1 ]; then
|
||||
echo "More than one byte was different between the two binaries"
|
||||
exit 4
|
||||
fi
|
||||
|
||||
echo "Verified only a single byte is different between the two binaries"
|
||||
|
||||
Reference in New Issue
Block a user