Skip to content

Commit

Permalink
ci: Try and fix calling the bench workflow (#1734)
Browse files Browse the repository at this point in the history
* ci: Try and fix calling the `bench` workflow

* Permissions

* Fix condition

* Fix
  • Loading branch information
larseggert authored Mar 12, 2024
1 parent d48fbed commit 5889038
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
8 changes: 2 additions & 6 deletions .github/actions/pr-comment-data-export/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ inputs:
runs:
using: composite
steps:
- if: >
github.event.workflow_run.event == 'pull_request' ||
github.event.workflow_run.event == 'workflow_run'
- if: github.event_name == 'pull_request'
shell: bash
run: |
mkdir comment-data
Expand All @@ -31,9 +29,7 @@ runs:
echo "${{ inputs.log-url }}" > comment-data/log-url
echo "${{ github.event.number }}" > comment-data/pr-number
- if: >
github.event.workflow_run.event == 'pull_request' ||
github.event.workflow_run.event == 'workflow_run'
- if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/bench-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Benchmark Comment

on:
workflow_run:
workflows: ["Bench"]
workflows: ["CI"]
types:
- completed

Expand All @@ -17,12 +17,8 @@ jobs:
permissions:
pull-requests: write
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' ||
github.event.workflow_run.event == 'workflow_run'
if: github.event.workflow_run.event == 'pull_request'
steps:
- uses: actions/checkout@v4
- run: echo ${{ github.event.workflow_run.event }}
- uses: ./.github/actions/pr-comment
with:
name: bench
7 changes: 1 addition & 6 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Bench
on:
workflow_run:
workflows: ["CI"]
types:
- completed
workflow_call:
workflow_dispatch:
env:
CARGO_PROFILE_BENCH_BUILD_OVERRIDE_DEBUG: true
Expand All @@ -18,8 +15,6 @@ jobs:
bench:
name: Benchmark
runs-on: self-hosted
permissions:
pull-requests: write
defaults:
run:
shell: bash
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,8 @@ jobs:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
if: matrix.type == 'debug' && matrix.rust-toolchain == 'stable'

bench:
name: "Benchmark"
needs: [check]
uses: ./.github/workflows/bench.yml

0 comments on commit 5889038

Please sign in to comment.