Skip to content

Commit

Permalink
base and head refs are not needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus committed Oct 6, 2023
1 parent bcc3bd6 commit 64d9bea
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ jobs:
with:
fetch-depth: 10

- name: Set up for PR context
if: github.event.inputs.pr_number
run: |
echo "PR_NUMBER=${{ github.event.inputs.pr_number }}" >> $GITHUB_ENV
PR_DATA=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.inputs.pr_number }} --jq '{ baseRefName: .base.ref, headRefName: .head.ref }')
echo "PR_BASE_REF=$(echo $PR_DATA | jq -r '.baseRefName')" >> $GITHUB_ENV
echo "PR_HEAD_REF=$(echo $PR_DATA | jq -r '.headRefName')" >> $GITHUB_ENV
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -79,7 +71,7 @@ jobs:
# TODO: can we optionally download if it only might fail?
#- name: PR; download bench results for compare
# if: ${{ env.PR_BASE_REF }}
# if: github.event.inputs.pr_number
# uses: actions/github-script@v6
# with:
# github-token: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -93,7 +85,7 @@ jobs:
# }

- name: PR; run bench
if: ${{ env.PR_BASE_REF }}
if: github.event.inputs.pr_number
working-directory: crates/bench/
run: |
echo "Running benchmarks without sqlite"
Expand All @@ -104,7 +96,7 @@ jobs:
cp target/criterion/branch.json criterion-results/pr-$PR_NUMBER.json
- name: PR; compare benchmarks
if: ${{ env.PR_BASE_REF }}
if: github.event.inputs.pr_number
working-directory: crates/bench/
run: |
if [ -e target/criterion/master.json ]; then
Expand Down

0 comments on commit 64d9bea

Please sign in to comment.