Skip to content

Commit

Permalink
crash report issue workflow (#1331)
Browse files Browse the repository at this point in the history
* Add issue creation functionality

* Correct template body

* Add bug lable to issue

* Correct diff check path

---------

Co-authored-by: Juanma <[email protected]>
  • Loading branch information
Juan-M-V and Juanma authored Jul 14, 2023
1 parent 013c8ba commit 3876ae7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/crash_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: WARNING crash found
labels: bug
---
Crash(es) reported by the fuzzer:
```{{ env.CRASH_REPORT }}```
23 changes: 22 additions & 1 deletion .github/workflows/fuzzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,25 @@ jobs:
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: changing report
file_pattern: '*/hfuzz_workspace/fuzzer/fuzz_json/HONGGFUZZ* */hfuzz_workspace/fuzzer/fuzz_json/SIG*'
file_pattern: '*/hfuzz_workspace/fuzzer/fuzz_json/HONGGFUZZ* */hfuzz_workspace/fuzzer/fuzz_json/*.fuzz'

# Checkout current and last commit for the diff
- name: Checkout commits
uses: actions/checkout@v2
with:
fetch-depth: 2

# Check if any new crashes were added
- name: Check diff
id: check_file_changed
run: echo "report=$(git diff --name-only HEAD^ HEAD -- fuzzer/hfuzz_workspace/fuzz_json/*.fuzz)" >> $GITHUB_OUTPUT

# If a new crash was found, create an issue
- name: Create issue
uses: JasonEtco/create-an-issue@v2
if: ${{ steps.check_file_changed.outputs.report != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CRASH_REPORT: ${{ steps.check_file_changed.outputs.report }}
with:
filename: .github/ISSUE_TEMPLATE/crash_report.md

1 comment on commit 3876ae7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: 3876ae7 Previous: 013c8ba Ratio
add_u64_with_felt/6 4 ns/iter (± 0) 3 ns/iter (± 0) 1.33
add_u64_with_felt/7 4 ns/iter (± 0) 3 ns/iter (± 0) 1.33
add_u64_with_felt/8 4 ns/iter (± 0) 3 ns/iter (± 0) 1.33

This comment was automatically generated by workflow using github-action-benchmark.

CC: @unbalancedparentheses

Please sign in to comment.