-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from neuralmagic/build-out-benchmarking-workflow
Fill in benchmark results workflow
- Loading branch information
Showing
2 changed files
with
127 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: nm github-action benchmark | ||
description: 'Use github-action-benchmark to visualize input json' | ||
inputs: | ||
gh_action_benchmark_name: | ||
description: "Name of the benchmark. Metrics are grouped by benchmark names. github_action_benchmark alert-trigger looks for the previous benchmark value in the benchmark-name group on the previous commit" | ||
gh_action_benchmark_json_file_path: | ||
description: "Path to the benchmark json file to upload (Note that this JSON should be in a `github-action-benchmark` consumable format - This is typically the output of neuralmagic/benchmarks/scripts/logging/gha_benchmark_logging.py)" | ||
required: true | ||
gh_action_benchmark_tool: | ||
description: "A string that is input to the `tool` argument of `github-action-benchmark`. This should be either `customBiggerIsBetter` or `customSmallerIsBetter`" | ||
required: true | ||
gh_pages_branch: | ||
description: "Github branch where the `github-action-benchmark` creates its index.html and data.js" | ||
required: true | ||
auto_push: | ||
description: "When set to true, pushes the benchmark results to the `nm-gh-pages` branch." | ||
required: true | ||
github_token: | ||
description: "secrets.GITHUB_TOKEN from the caller" | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# A previous invocation of this action may have left the github pages branch in an | ||
# inconsistent state. | ||
- name: reset github pages branch | ||
run: | | ||
git update-ref refs/heads/${{ inputs.gh_pages_branch }} origin/${{ inputs.gh_pages_branch }} | ||
shell: bash | ||
|
||
- name: push to gh pages | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: ${{ inputs.gh_action_benchmark_name }} | ||
output-file-path: ${{ inputs.gh_action_benchmark_json_file_path }} | ||
tool: ${{ inputs.gh_action_benchmark_tool }} | ||
gh-pages-branch: ${{ inputs.gh_pages_branch }} | ||
# Token required for pushing to nm-gh-pages branch | ||
github-token: ${{ inputs.github_token }} | ||
# Push and deploy to Github pages automatically | ||
auto-push: ${{ inputs.auto_push == 'true' }} | ||
# Create an alert when some value has regressed more than 10% | ||
alert-threshold: "110%" | ||
# TODO (varun): Is this a reasonable number ? | ||
max-items-in-chart: 50 |
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