Skip to content

Commit 286b240

Browse files
Manan17Manan Shahvaibhavjindal
authored
Automate Benchmarking - fixing issue. (#836)
## Summary <!--- This is a required section; please describe the main purpose of this proposed code change. ---> Weekly runs were failing, fixed it. <!--- ## Details This is an optional section; is there anything specific that reviewers should be aware of? ---> ## Testing Done <!--- This is a required section; please describe how this change was tested. ---> <!-- Replace BLANK with your device type. For example, A100-80G-PCIe Complete the following tasks before sending your PR, and replace `[ ]` with `[x]` to indicate you have done them. --> - Hardware Type: <BLANK> - [ ] run `make test` to ensure correctness - [ ] run `make checkstyle` to ensure code style - [ ] run `make test-convergence` to ensure convergence --------- Co-authored-by: Manan Shah <[email protected]> Co-authored-by: Vaibhav Jindal <[email protected]>
1 parent 7705dcc commit 286b240

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/benchmark.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ jobs:
3939

4040
steps:
4141
# Step: Decide the commit hash to use
42+
# Step: Checkout full history so we can check out any commit
43+
- name: Checkout full repo history
44+
uses: actions/checkout@v3
45+
with:
46+
fetch-depth: 0 # Important: so we can checkout arbitrary commit
47+
4248
- name: Determine commit hash to checkout
4349
id: choose_commit
4450
run: |
45-
if [ "${{ github.event.inputs.commit_hash }}" != "" ]; then
51+
if [ "${{ github.event_name}}" == "workflow_dispatch" ] && [ "${{ github.event.inputs.commit_hash }}" != "main" ]; then
4652
echo "Using manual input commit: ${{ github.event.inputs.commit_hash }}"
4753
echo "hash=${{ github.event.inputs.commit_hash }}" >> $GITHUB_OUTPUT
4854
else
4955
echo "Using latest commit from main"
50-
git fetch origin main
51-
echo "hash=$(git rev-parse origin/main)" >> $GITHUB_OUTPUT
56+
echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
5257
fi
5358
54-
# Step: Checkout full history so we can check out any commit
55-
- name: Checkout full repo history
56-
uses: actions/checkout@v3
57-
with:
58-
fetch-depth: 0 # Important: so we can checkout arbitrary commit
59-
# Step: Conditionally replace benchmark folder from main
59+
# Step: Conditionally replace benchmark folder from main
6060
- name: Replace benchmark folder from main (manual only, commit ≠ main)
6161
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit_hash != 'main' }}
6262
run: |

0 commit comments

Comments
 (0)