Commit d6178fe3 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

benchmark scripts: Only fetch master branch if needed

parent 4968a8a9
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -28,10 +28,13 @@ if [[ ! -z "$CI" ]]; then
    cp -r ~/.$PROJECT/asv/results .asv/results
  fi
  rm -rf .asv/env
  # Fetch the master branch as git repository in gitlab ci env doesn't have it.
  git fetch origin master

  # Fetch the master branch if the git repository in the gitlab CI env does not have it.
  if ! git rev-parse --verify master > /dev/null 2>&1; then
    git fetch origin master || true
    git branch master origin/master
  fi
fi

if [[ ! -f ~/.asv-machine.json ]]; then
  asv machine --yes