Skip to content

Commit

Permalink
Fix benchmark.yml (#5071)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed Jan 24, 2023
1 parent 34031af commit fa92022
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
42 changes: 19 additions & 23 deletions .github/workflows/benchmark.yml
Expand Up @@ -6,38 +6,34 @@ on:
jobs:
benchmark:
runs-on: [self-hosted, plutus-benchmark]

permissions:
pull-requests: write

if: |
startsWith(github.event.comment.body, '/benchmark') &&
github.event.issue.pull_request
steps:
#
# Checkout the repository so that we can use scripts from it
#
- name: Checkout
uses: actions/checkout@v3.3.0

#
# Check for '/benchmark' comments on a PR
#
- uses: khan/pull-request-comment-trigger@v1.1.0
id: find-comment
with:
trigger: '/benchmark'
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

#
# Extract the branch of that the PR the comment was added to belongs to
#
- uses: xt0rted/pull-request-comment-branch@v1
if: steps.find-comment.outputs.triggered == 'true'
id: extract-branch
- name: React with Rocket
uses: actions/github-script@v6
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.reactions.createForIssueComment({
owner: context.issue.owner,
repo: context.issue.repo,
comment_id: context.payload.comment.id,
content: "rocket"
});
#
# Extract the benchmark name from the comment text
#
- uses: actions-ecosystem/action-regex-match@v2
if: steps.find-comment.outputs.triggered == 'true'
if: success()
id: extract-benchmark
with:
# The 'pull-request-comment-trigger` action alleges that you
Expand All @@ -51,4 +47,4 @@ jobs:
#
- run: |
nix develop --no-warn-dirty --accept-flake-config --command bash ./scripts/ci-plutus-benchmark.sh ${{ github.event.issue.number }} ${{ steps.extract-benchmark.outputs.group1 }}
if: steps.find-comment.outputs.triggered == 'true' && steps.extract-benchmark.outputs.match != ''
if: success()
1 change: 1 addition & 0 deletions nix/cells/plutus/library/make-plutus-shell.nix
Expand Up @@ -138,6 +138,7 @@ inputs.std.lib.dev.mkShell {
pkgs.yq
pkgs.gnused
pkgs.awscli2
pkgs.act
pkgs.bzip2

# Needed to make building things work, not for commands
Expand Down

0 comments on commit fa92022

Please sign in to comment.