You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/benchmarks.yml
+41-3Lines changed: 41 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ on:
6
6
workflow_dispatch:
7
7
inputs:
8
8
versions:
9
-
description: "Comma-separated list of Foundry versions to benchmark (optional, defaults to 'v1.5.1,v1.7.0')"
9
+
description: "Comma-separated list of Foundry versions to benchmark (optional, defaults to 'stable,local'). Use 'local' to bench HEAD of the current branch."
10
10
required: false
11
11
type: string
12
12
repos:
@@ -15,7 +15,7 @@ on:
15
15
type: string
16
16
17
17
env:
18
-
DEFAULT_VERSIONS: "v1.5.1,v1.7.0"
18
+
DEFAULT_VERSIONS: "stable,local"
19
19
20
20
# Repos to benchmark per step. Each comma-separated entry has the form
21
21
# org/repo[:rev][ <extra args>]
@@ -24,7 +24,7 @@ env:
24
24
# `--nmc BrokenTest`, so a single failing test does not fail the whole CI).
console.log(`No open PR found for branch '${branch}', skipping comment.`);
235
+
return;
236
+
}
237
+
238
+
const prNumber = prs[0].number;
239
+
const body = `## Benchmark Results (stable vs this branch)\n\n${formatted}\n\n---\n\n🤖 This comment was automatically generated by the [Foundry Benchmarks workflow](https://github.com/${{ github.repository }}/actions/workflows/benchmarks.yml).`;
240
+
241
+
await github.rest.issues.createComment({
242
+
issue_number: prNumber,
243
+
owner: context.repo.owner,
244
+
repo: context.repo.repo,
245
+
body,
246
+
});
247
+
248
+
console.log(`Posted benchmark results to PR #${prNumber}`);
stale-pr-message: "This pull request is stale because it has been open for 14 days with no activity. It will be closed in 7 days if there is no further activity."
29
+
close-pr-message: "This pull request was closed because it has been inactive for 7 days since being marked as stale."
0 commit comments