diff --git a/src/thirdparty/build_boost.sh b/src/thirdparty/build_boost.sh index 9123cc615..1da2ca015 100755 --- a/src/thirdparty/build_boost.sh +++ b/src/thirdparty/build_boost.sh @@ -11,7 +11,7 @@ BOOST_VERSION=1.65.1 BOOST_VERSION_UNDERSCORE=1_65_1 # Download and compile boost if it isn't already present. -if [ ! -d $TP_DIR/boost ]; then +if [[ ! -d $TP_DIR/boost ]]; then # The wget command frequently fails, so retry up to 20 times. for COUNT in {1..20}; do # Attempt to wget boost and break from the retry loop if it succeeds. diff --git a/src/thirdparty/build_ui.sh b/src/thirdparty/build_ui.sh index 0e4ad2ccf..975ea13bf 100755 --- a/src/thirdparty/build_ui.sh +++ b/src/thirdparty/build_ui.sh @@ -7,7 +7,7 @@ set -e TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) -CATAPULT_COMMIT=33a9271eb3cf5caf925293ec6a4b47c94f1ac968 +CATAPULT_COMMIT=18cd334755701cf0c3b90b7172126c686d2eb787 CATAPULT_HOME=$TP_DIR/catapult VULCANIZE_BIN=$CATAPULT_HOME/tracing/bin/vulcanize_trace_viewer @@ -18,7 +18,7 @@ mkdir -p $CATAPULT_FILES if [ ! type python2 > /dev/null ]; then echo "cannot properly set up UI without a python2 executable" - if [ "$INCLUDE_UI" == "1" ]; then + if [[ "$INCLUDE_UI" == "1" ]]; then # Since the UI is explicitly supposed to be included, fail here. exit 1 else @@ -29,10 +29,18 @@ fi # Download catapult and use it to autogenerate some static html if it isn't # already present. -if [ ! -d $CATAPULT_HOME ]; then +if [[ ! -d $CATAPULT_HOME ]]; then echo "setting up catapult" - # Clone the catapult repository. - git clone https://github.com/catapult-project/catapult.git $CATAPULT_HOME + # The git clone command seems to fail in Travis, so retry up to 20 times. + for COUNT in {1..20}; do + # Attempt to git clone catapult and break from the retry loop if it succeeds. + git clone https://github.com/ray-project/catapult.git $CATAPULT_HOME && break + # If none of the retries succeeded at getting boost, then fail. + if [[ $COUNT == 20 ]]; then + exit 1 + fi + done + # Check out the appropriate commit from catapult. pushd $CATAPULT_HOME git checkout $CATAPULT_COMMIT @@ -40,7 +48,7 @@ if [ ! -d $CATAPULT_HOME ]; then fi # If the autogenerated catapult files aren't present, then generate them. -if [ ! -f $CATAPULT_FILES/index.html ]; then +if [[ ! -f $CATAPULT_FILES/index.html ]]; then python2 $VULCANIZE_BIN --config chrome --output $CATAPULT_FILES/trace_viewer_full.html cp $CATAPULT_HOME/tracing/bin/index.html $CATAPULT_FILES/index.html fi