-
Notifications
You must be signed in to change notification settings - Fork 189
For #304: GH comment hook #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a81882f
Initial commit, for #304
Oseltamivir d27616a
Allow testing on own PR
Oseltamivir dce0b32
condense workflow
Oseltamivir 503ed3b
Rename Workflow
Oseltamivir f1feee4
Use environments
Oseltamivir 9a5fe6e
Changed environment location
Oseltamivir 4524540
Stricter activation
Oseltamivir 91e6d6c
Test replies
Oseltamivir ac35382
Test replies
Oseltamivir c09922a
Use token for comment perm
Oseltamivir 4f9eb0c
Forgot validation
Oseltamivir b6fa101
feat: performance changelog triggered runs (as opposed to nightly) (#…
cquil11 5383cfa
chore(deps): bump the github-actions group across 1 directory with 3 …
dependabot[bot] 2a85d1d
fix: add final newline to original perf-changelog.yaml so that there …
cquil11 1a3e65c
Update MI355x Deepseek-R1 FP4 SGLang Image to v0.5.6.post1 (#330)
ppalanga a0e1b7e
Merge branch 'main' into slash-commands
cquil11 c13b7f7
TOCTOU
Oseltamivir 80e40d4
Test new env
Oseltamivir 724c370
Ready for merge
Oseltamivir a397f9a
Add benchmark script for GPTOSS FP4 B200 TRT-LLM (#256)
Ankur-singh b9faa9d
Merge branch 'main' into slash-commands
cquil11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,126 @@ | ||
| name: Slash Command Sweep | ||
|
|
||
| on: | ||
| # PR comment trigger | ||
| issue_comment: | ||
| types: [created] | ||
| # Manual trigger | ||
| workflow_dispatch: | ||
| inputs: | ||
| pr-number: | ||
| description: PR number to checkout (refs/pull/<num>/head) | ||
| required: false | ||
| type: string | ||
| generator-args: | ||
| description: Args passed to generate_sweep_configs.py (omit /sweep) | ||
| required: false | ||
| type: string | ||
| # Push-based example/testing | ||
| push: | ||
| branches-ignore: | ||
| - main | ||
| - master | ||
|
|
||
| concurrency: | ||
| group: ${{ github.event.issue.number && format('PR-SWEEP-{0}', github.event.issue.number) || format('REF-SWEEP-{0}', github.ref_name) }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| prepare: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| pr-number: ${{ steps.parse.outputs.pr-number || steps.resolve.outputs.pr-number }} | ||
| generator-args: ${{ steps.parse.outputs.generator-args || steps.resolve.outputs.generator-args }} | ||
| steps: | ||
| - name: Parse PR comment (/sweep ...) | ||
| id: parse | ||
| if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/sweep') }} | ||
| shell: bash | ||
| env: | ||
| BODY: ${{ github.event.comment.body }} | ||
| PR_NUMBER: ${{ github.event.issue.number }} | ||
| run: | | ||
| set -euo pipefail | ||
| # Allow optional leading whitespace before /sweep | ||
| cmd_line=$(printf "%s" "$BODY" | awk '/^[[:space:]]*\/sweep/{print; exit}') | ||
| if [[ -z "$cmd_line" ]]; then | ||
| echo "No /sweep command found in comment" >&2 | ||
| exit 1 | ||
| fi | ||
| # Trim leading spaces then strip the /sweep prefix | ||
| cmd_line=$(echo "$cmd_line" | sed 's/^[[:space:]]*//') | ||
| if [[ "$cmd_line" == "/sweep" ]]; then | ||
| cmd_args="" | ||
| else | ||
| cmd_args=${cmd_line#/sweep} | ||
| fi | ||
| cmd_args=$(echo "$cmd_args" | xargs || true) | ||
|
|
||
| echo "generator-args=$cmd_args" >> "$GITHUB_OUTPUT" | ||
| echo "pr-number=$PR_NUMBER" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Find PR for this branch (if any) | ||
| id: find | ||
| if: ${{ github.event_name != 'issue_comment' }} | ||
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
| with: | ||
| script: | | ||
| const owner = context.repo.owner; | ||
| const repo = context.repo.repo; | ||
| const branch = context.ref.replace('refs/heads/', ''); | ||
| const res = await github.rest.pulls.list({ owner, repo, state: 'open', head: `${owner}:${branch}` }); | ||
| const num = res.data[0]?.number ? String(res.data[0].number) : ''; | ||
| core.setOutput('pr-number', num); | ||
|
|
||
| - name: Prepare inputs (push/dispatch) | ||
| id: resolve | ||
| if: ${{ github.event_name != 'issue_comment' }} | ||
| shell: bash | ||
| env: | ||
| DISPATCH_PR: ${{ github.event.inputs.pr-number }} | ||
| DISPATCH_ARGS: ${{ github.event.inputs.generator-args }} | ||
| run: | | ||
| set -euo pipefail | ||
| pr_from_branch='${{ steps.find.outputs.pr-number }}' | ||
| pr_number="${DISPATCH_PR:-}"; if [[ -z "$pr_number" ]]; then pr_number="$pr_from_branch"; fi | ||
| gen_args="${DISPATCH_ARGS:-}" | ||
| if [[ -z "$gen_args" ]]; then | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no default
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default( |
||
| gen_args='full-sweep --single-node --runner-type h200 --model-prefix dsr1 --seq-lens 1k1k --max-conc 4' | ||
| fi | ||
| echo "Resolved PR: $pr_number"; | ||
| echo "Using generator args: $gen_args"; | ||
| echo "pr-number=$pr_number" >> "$GITHUB_OUTPUT" | ||
| echo "generator-args=$gen_args" >> "$GITHUB_OUTPUT" | ||
|
|
||
| call-e2e-pr: | ||
| needs: prepare | ||
| if: ${{ github.event_name == 'issue_comment' && needs.prepare.outputs.pr-number != '' && needs.prepare.outputs.generator-args != '' }} | ||
| uses: ./.github/workflows/e2e-tests.yml | ||
| name: Run E2E (PR comment) | ||
| secrets: inherit | ||
| with: | ||
| generate-cli-command: ${{ needs.prepare.outputs.generator-args }} | ||
| test-name: PR #${{ needs.prepare.outputs.pr-number }} sweep | ||
| ref: refs/pull/${{ needs.prepare.outputs.pr-number }}/head | ||
|
|
||
| call-e2e-nonpr: | ||
| needs: prepare | ||
| if: ${{ github.event_name != 'issue_comment' && needs.prepare.outputs.generator-args != '' }} | ||
| uses: ./.github/workflows/e2e-tests.yml | ||
| name: Run E2E (manual/push) | ||
| secrets: inherit | ||
| with: | ||
| generate-cli-command: ${{ needs.prepare.outputs.generator-args }} | ||
| test-name: Manual/Push sweep | ||
| ref: ${{ needs.prepare.outputs.pr-number && format('refs/pull/{0}/head', needs.prepare.outputs.pr-number) || '' }} | ||
|
|
||
| note-ignored: | ||
| # Inform when comment doesn't meet criteria (non-PR or not a /sweep) | ||
| if: ${{ github.event_name == 'issue_comment' && (!github.event.issue.pull_request || !startsWith(github.event.comment.body, '/sweep')) }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - run: | | ||
| echo "Comment ignored. Either not on a PR or not a /sweep command. For PR comments, runs require environment approval." | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.