Committing Cargo.lock #71
This file contains 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
# According to: | |
# - https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#issue_comment | |
# - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context | |
# | |
name: Benchmark PR | |
permissions: | |
contents: read | |
pull-requests: write | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
runBenchmark: | |
if: | | |
github.event.issue.pull_request && | |
contains(github.event.comment.body, '/benchmark') | |
name: Criterion benchmark | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to init the repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Get PR base branch name | |
run: | | |
branchName=$(curl -s https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} | python3 -c "import sys, json; print(json.load(sys.stdin)['base']['ref'])") | |
echo "branchName=$branchName" >> $GITHUB_ENV | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Compares PR branch to target | |
uses: boa-dev/criterion-compare-action@adfd3a94634fe2041ce5613eb7df09d247555b87 # v3.2.4 | |
with: | |
branchName: ${{ env.branchName }} | |
benchName: "bench_archive" | |
token: ${{ secrets.GITHUB_TOKEN }} |