Skip to content

Commit

Permalink
Merge pull request IntersectMBO#3458 from input-output-hk/extend-benc…
Browse files Browse the repository at this point in the history
…h-ci-output

ci-plutus-benchmark: add git ref info
  • Loading branch information
gilligan authored Jun 30, 2021
2 parents 0596b79 + 1ecbbe0 commit 4f2a9e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/ci-plutus-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if [ -z "$PR_NUMBER" ] ; then
exit 1
fi
echo "[ci-plutus-benchmark]: Processing benchmark comparison for PR $PR_NUMBER"
PR_BRANCH_REF=$(git show-ref -s HEAD)

echo "[ci-plutus-benchmark]: Updating cabal database ..."
cabal update
Expand All @@ -39,12 +40,14 @@ cabal bench plutus-benchmark:validation >bench-PR.log 2>&1

echo "[ci-plutus-benchmark]: Switching branches ..."
git checkout "$(git merge-base HEAD master)"
BASE_BRANCH_REF=$(git show-ref -s HEAD)

echo "[ci-plutus-benchmark]: Running benchmark for base branch ..."
cabal bench plutus-benchmark:validation >bench-base.log 2>&1

echo "[ci-plutus-benchmark]: Comparing results ..."
./plutus-benchmark/bench-compare bench-base.log bench-PR.log >bench-compare-result.log
echo -e "Comparing benchmark results of '$BASE_BRANCH_REF' (base) and '$PR_BRANCH_REF' (PR)\n" >bench-compare-result.log
./plutus-benchmark/bench-compare bench-base.log bench-PR.log >>bench-compare-result.log
nix-shell -p jq --run "jq -Rs '.' bench-compare-result.log >bench-compare.json"

echo "[ci-plutus-benchmark]: Posting results to GitHub ..."
Expand Down

0 comments on commit 4f2a9e3

Please sign in to comment.