Files
monkey/compare.sh
csmith f9e6e164b0
Some checks failed
Build / build (push) Successful in 10m40s
Publish Image / publish (push) Failing after 34s
Test / build (push) Has been cancelled
further improvements
2024-04-01 17:02:44 -04:00

24 lines
530 B
Bash

#!/usr/bin/env bash
if [ $# -ne 1 ]; then
echo "Usage: $(basename "$0") <branch>"
exit 1
fi
compareWith="$1"
currentBranch="$(git branch --show-current)"
if [ -n "$(git status --porcelain)" ]; then
echo "$currentBranch is not clean, please stash or commit your changes!"
exit 1
fi
hyperfine \
-w 5 \
-c "git checkout $currentBranch" \
-p "make build" \
-p "git checkout $compareWith; make build" \
-n "$currentBranch" \
-n "$compareWith" \
'./monkey examples/fib.monkey' \
'./monkey examples/fib.monkey'