Skip to content

Commit

Permalink
Fix Benchmark.yml again
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana committed Jan 24, 2023
1 parent fa92022 commit aff0167
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/benchmark.yml
Expand Up @@ -5,7 +5,8 @@ on:

jobs:
benchmark:
runs-on: [self-hosted, plutus-benchmark]
runs-on: ubuntu-latest
# runs-on: [self-hosted, plutus-benchmark]

permissions:
pull-requests: write
Expand All @@ -29,22 +30,22 @@ jobs:
content: "rocket"
});
#
# Extract the benchmark name from the comment text
#
- uses: actions-ecosystem/action-regex-match@v2
if: success()
- name: Extract Benchmark Name
id: extract-benchmark
uses: actions/github-script@v6
with:
# The 'pull-request-comment-trigger` action alleges that you
# can get the matched comment via its comment_body output, but
# this is a lie: https://github.com/Khan/pull-request-comment-trigger/issues/6
text: ${{ github.event.comment.body }}
regex: '^\/benchmark\s*(.*?)\s*$'
script: |
const regex = '^\/benchmark\s*(.*?)\s*$';
const comment = context.payload.comment.body;
const match = comment.match(regex)
if (match !== null && match.length == 2)
core.setOutput('benchmark', match[1]);
else
core.setFailed(`Unable to extract benchmark name from {comment}`);
#
# Run the benchmark if the 'benchmark' command was found
#
- 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 }}
nix develop --no-warn-dirty --accept-flake-config --command bash ./scripts/ci-plutus-benchmark.sh ${{ github.event.issue.number }} ${{ steps.extract-benchmark.outputs.benchmark }}
if: success()

0 comments on commit aff0167

Please sign in to comment.