Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix benchmark.yml #5071

Merged
merged 4 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 19 additions & 23 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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