-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
142 changed files
with
4,430 additions
and
8,663 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ permissions: | |
jobs: | ||
benchmark: | ||
name: Benchmark | ||
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/run_benchmarks') }} | ||
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/benchmark') }} | ||
runs-on: [self-hosted, linux] | ||
steps: | ||
- uses: actions/github-script@v6 | ||
|
@@ -37,10 +37,11 @@ jobs: | |
id: command | ||
with: | ||
result-encoding: string | ||
# /benchmark CHAIN_NAME [PALLET_NAME] | ||
script: | | ||
const [, , cmd, ...args] = context.payload.comment.body.split(/\W+/) | ||
const [cmd, ...args] = context.payload.comment.body.split(" ") | ||
const [runtime, pallet] = args | ||
return `bash ./scripts/benchmark.sh -r ${runtime ?? "*"} -p ${pallet ?? "*"}` | ||
return `bash ./scripts/benchmark.sh -r ${runtime ?? ""} -p ${pallet ?? ""}` | ||
- uses: actions/github-script@v6 | ||
name: Post comment | ||
id: comment | ||
|
@@ -70,10 +71,12 @@ jobs: | |
- name: Run benchmarks | ||
run: ${{steps.command.outputs.result}} > ${{runner.temp}}/out.txt | ||
- name: Commit new weights | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Automated weights | ||
|
||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Interlay Bot" | ||
git add . | ||
git commit -m '${{github.event.comment.body}}' --allow-empty | ||
git push origin HEAD:${{ fromJson(steps.issue.outputs.result).ref }} | ||
- uses: actions/github-script@v6 | ||
name: Update comment | ||
with: | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.