feat(decompile): loop detection and analysis #229
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: [pull_request] | |
| name: bench | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| runBenchmark: | |
| name: run benchmark | |
| runs-on: buildjet-16vcpu-ubuntu-2204 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: boa-dev/criterion-compare-action@v3 | |
| with: | |
| package: "heimdall-core" | |
| branchName: ${{ github.base_ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Delete old benchmark comments | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { data: comments } = await github.rest.issues.listComments({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| }); | |
| const benchmarkComments = comments.filter( | |
| c => c.user.login === 'github-actions[bot]' && c.body.includes('Benchmark for') | |
| ); | |
| // Delete all but the most recent benchmark comment | |
| for (const comment of benchmarkComments.slice(0, -1)) { | |
| await github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: comment.id, | |
| }); | |
| } |