Skip to content

Commit

Permalink
Merge branch 'master' into feature/go-native-trace
Browse files Browse the repository at this point in the history
  • Loading branch information
piersy authored Nov 21, 2022
2 parents cdd905e + 45da8bf commit ac8da4f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
16 changes: 15 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,21 @@ shallow-checkout: &shallow-checkout
name: shallow checkout
command: |
mkdir ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
git clone --quiet --depth 1 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" ~/repos/geth
# CIRCLE_PR_NUMBER is only set for forked PRs and for forked PRs we need
# a different approach to check out the branch.
if [ -z ${CIRCLE_PR_NUMBER} ]; then
# Non forked PR
git clone --quiet --depth 1 ${CIRCLE_REPOSITORY_URL} --branch ${CIRCLE_BRANCH} ~/repos/geth
else
# Forked PR, in this case we need to fetch the remote ref (because its not a branch so we can't clone directly to it)
# See https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
# Use the github api to get the branch name
git clone --quiet --depth 1 ${CIRCLE_REPOSITORY_URL} ~/repos/geth
cd ~/repos/geth
git fetch --depth 1 origin pull/${CIRCLE_PR_NUMBER}/head:${CIRCLE_BRANCH}
git checkout ${CIRCLE_BRANCH}
fi
install-go: &install-go
run:
Expand Down
11 changes: 7 additions & 4 deletions scripts/sync_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ if [ -z "$MODE" ]; then
echo "Set MODE to the sync mode"
exit 3
fi
LOGFILE=/tmp/sync_test.log

MARK=`date +%s`
# Do the sync
echo "Running geth sync"
build/bin/geth --datadir $DATADIR --syncmode $MODE --exitwhensynced >> $LOGFILE 2>&1
echo "Checking sync result"
MARK=`date +%s`
echo "-----------------"
build/bin/geth --datadir $DATADIR --syncmode $MODE --exitwhensynced

echo "-------------------------------"
echo "Geth exited cheking sync status"
echo "-------------------------------"

# Now check what the latest block is
ATTEMPTS=10
Expand Down

0 comments on commit ac8da4f

Please sign in to comment.