Skip to content

Commit

Permalink
Merge pull request #108 from alankritdabral/test-bencher
Browse files Browse the repository at this point in the history
ci:Update benchmark.yml
  • Loading branch information
alankritdabral authored Apr 9, 2024
2 parents 378b84e + 8555748 commit a4859a7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
paths-ignore: ["docs/**", "**.md"]
types: [opened, reopened, synchronize, labeled]
pull_request_target:
paths-ignore: ["docs/**", "**.md"]
types: [opened, reopened, synchronize, labeled]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -16,7 +19,7 @@ concurrency:
jobs:
macro_benchmark:
name: Macro Benchmarks
if: "contains(github.event.pull_request.labels.*.name, 'ci: benchmark') || github.event_name == 'push'"
if: "(contains(github.event.pull_request.labels.*.name, 'ci: benchmark') && github.event_name == 'pull_request') || github.event_name == 'push'"
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand Down Expand Up @@ -111,7 +114,7 @@ jobs:

Criterion_Compare:
name: Comparing Micro Benchmarks
if: "contains(github.event.pull_request.labels.*.name, 'ci: benchmark')"
if: "(contains(github.event.pull_request.labels.*.name, 'ci: benchmark') && github.event_name == 'pull_request_target')"
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand Down Expand Up @@ -164,7 +167,7 @@ jobs:
- name: Track PR Benchmarks
run: |
bencher run \
bencher run \
--branch "$BRANCH_NAME" \
--token "${{ secrets.BENCHER_API_TOKEN }}" \
--github-actions "${{ secrets.GITHUB_TOKEN }}" \
Expand Down

0 comments on commit a4859a7

Please sign in to comment.