1#!/bin/bash 2 3# For a newly pushed branch the BEFORE_SHA will be all 0s 4if [[ ${BASE} == 0000000000000000000000000000000000000000 ]]; then 5 echo "Newly pushed branch, skipped" 6 exit 0 7fi 8 9git merge-base --is-ancestor ${BASE} ${TIP} 10if [[ $? -ne 0 ]]; then 11 echo "${TIP} is not a descendent of ${BASE}, skipped" 12 exit 0 13fi 14 15if [ -d /usr/lib/ccache ]; then 16 echo "Building with ccache" 17 PATH="/usr/lib/ccache:$PATH" 18fi 19 20echo "Building ${BASE}..${TIP}" 21 22NON_SYMBOLIC_REF=1 ./automation/scripts/build-test.sh ${BASE} ${TIP} \ 23 bash -c "git clean -ffdx -e '/build-*.log' && ./automation/scripts/build" 24