blob: 53e7033ac61c40b4605e3fed5af3a11f153a628b [file] [log] [blame]
#! /bin/bash
# Look for location binaries first
export PATH="$HOME/.local-bin/bin:$PATH"
# OS X specific common setup
if [[ "${OS}" == "macOS" ]]; then
export PATH="/usr/local/opt/ccache/libexec:$PATH"
fi
# Parallel builds!
MAKEFLAGS="-j 2"
function action_fold() {
if [ "$1" = "start" ]; then
echo "::group::$2"
SECONDS=0
else
duration=$SECONDS
echo "::endgroup::"
printf "${GRAY}took $(($duration / 60)) min $(($duration % 60)) sec.${NC}\n"
fi
return 0;
}
function start_section() {
action_fold start "$1"
echo -e "${PURPLE}SymbiFlow Yosys Plugins${NC}: - $2${NC}"
echo -e "${GRAY}-------------------------------------------------------------------${NC}"
}
export -f start_section
function end_section() {
echo -e "${GRAY}-------------------------------------------------------------------${NC}"
action_fold end "$1"
}
export -f end_section