OpenFPGA/.travis/common.sh

44 lines
1.2 KiB
Bash
Raw Normal View History

2019-04-10 02:24:37 -05:00
# Some colors, use it like following;
# echo -e "Hello ${YELLOW}yellow${NC}"
GRAY='\033[0;30m'
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
PURPLE='\033[0;35m'
NC='\033[0m' # No Color
SPACER="echo -e ${GRAY} - ${NC}"
export -f travis_nanoseconds
export -f travis_fold
export -f travis_time_start
export -f travis_time_finish
function start_section() {
travis_fold start "$1"
travis_time_start
echo -e "${PURPLE}OpenFPGA${NC}: - $2${NC}"
echo -e "${GRAY}-------------------------------------------------------------------${NC}"
}
function end_section() {
echo -e "${GRAY}-------------------------------------------------------------------${NC}"
travis_time_finish
travis_fold end "$1"
}
2019-04-10 02:29:39 -05:00
# For Mac OS, we use g++ and gcc as default compilers
2019-04-10 02:24:37 -05:00
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
2019-04-10 03:00:03 -05:00
export CC=gcc-4.9
export CXX=g++-4.9
2019-04-10 02:24:37 -05:00
# export PATH="/usr/local/opt/bison/bin:/usr/local/bin:$PATH"
# export PATH="/usr/local/opt/qt/bin:$PATH"
# Install header files in Mojave, if not gcc-4.9 cannot spot stdio.h
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
else
# For linux, we use g++-8 and gcc-8 as default compilers
2019-06-07 23:25:55 -05:00
export CC=gcc-6
export CXX=g++-6
2019-04-10 02:24:37 -05:00
fi