Skip to content

Commit

Permalink
Retry
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Mar 11, 2024
1 parent 9b593a5 commit cb69be0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Bench
on:
workflow_call:
outputs:
results:
description: 'Benchmark results formatted as Markdown'
value: ${{ jobs.bench.outputs.results }}
workflow_dispatch:
env:
CARGO_PROFILE_BENCH_BUILD_OVERRIDE_DEBUG: true
Expand All @@ -15,8 +19,8 @@ jobs:
bench:
name: Benchmark
runs-on: self-hosted
permissions:
pull-requests: write
outputs:
results: ${{ steps.results.outputs.results }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -130,6 +134,7 @@ jobs:
compression-level: 9

- name: Format results as Markdown
id: results
run: |
grep -Ev 'ignored|running \d+ tests|%\)' output.txt |\
sed -E -e 's/(Performance has regressed.)/:broken_heart: **\1**/gi' \
Expand All @@ -140,10 +145,4 @@ jobs:
> results.md
echo '' >> results.md
echo '[:arrow_down: Download full results](${{ steps.export.outputs.artifact-url }})' >> results.md
- name: Post results to PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: results.md
pr_number: ${{ github.event.pull_request.number }}
comment_tag: bench-results
echo "results='$(cat results.md)'" >> "$GITHUB_OUTPUT"
15 changes: 12 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,16 @@ jobs:

bench:
name: "Benchmark"
needs: [check]
permissions:
pull-requests: write
# needs: [check]
uses: ./.github/workflows/bench.yml

pr-comment:
name: "Post results to PR"
needs: [bench]
runs-on: ubuntu-latest
steps:
- uses: thollander/actions-comment-pull-request@v2
with:
message: ${{ needs.bench.outputs.results }}
pr_number: ${{ github.event.pull_request.number }}
comment_tag: bench-results

0 comments on commit cb69be0

Please sign in to comment.