Skip to content

Fix ci sha#616

Merged
jensen-yan merged 2 commits intoxs-devfrom
fix-ci-sha
Nov 27, 2025
Merged

Fix ci sha#616
jensen-yan merged 2 commits intoxs-devfrom
fix-ci-sha

Conversation

@jensen-yan
Copy link
Copy Markdown
Collaborator

@jensen-yan jensen-yan commented Nov 26, 2025

Summary by CodeRabbit

  • Documentation

    • Updated performance testing trigger mechanism: use perf labels on PRs instead of manual commands; alternatively trigger via Actions with manual inputs.
  • Chores

    • Enhanced CI/CD workflow stability and reporting with improved archive output details in workflow summaries.

✏️ Tip: You can customize this high-level summary in your review settings.

Remove unused pr_ref plumbing from perf template to avoid branch drift

Change-Id: I9d6a11704e8d3259c1a848e164d9c1c31407817b
Change-Id: I3213462466bb3701fd5c78bf371bdc8cfdcf9144
@github-actions
Copy link
Copy Markdown

🚀 Performance test triggered: spec06-0.8c

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 26, 2025

Walkthrough

This pull request refactors GitHub workflow automation for SPEC performance testing. Primary updates include renaming pr_ref to pr_sha across workflow files to reference commit SHAs instead of branch names, updating documentation on trigger mechanisms from PR commands to perf labels, and adding archive output details to CI summaries.

Changes

Cohort / File(s) Change Summary
Documentation Updates
.github/workflows/README.md
Updated trigger mechanism documentation from "PR comment commands" to "perf label" as the primary trigger method, with optional manual workflow inputs. Added "Current Implementation" sections describing label-based automation and on-demand SPEC execution.
Workflow Variable Refactoring
.github/workflows/gem5-perf-template.yml, .github/workflows/on-demand-spec.yml
Systematically replaced pr_ref variable references with pr_sha throughout both workflow files. Updated checkout logic to use commit SHA instead of branch reference. Changed data source from pr.data.head.ref to pr.data.head.sha. Added archive output path and size details to CI summary in gem5-perf-template.yml.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Variable renaming is consistent and mechanical across workflow files
  • Documentation updates are straightforward and additive
  • Primary concern: Verify that switching from branch references (ref) to commit SHAs (sha) doesn't introduce unintended side effects in checkout or comparison logic
  • Confirm that all downstream references to the renamed variables have been updated consistently

Poem

🐰 A rabbit reviewed the workflows with glee,
pr_ref to pr_sha—now clearer to see!
From branches to commits, the truth now runs deep,
Labels trigger the tests while workflows don't sleep. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Fix ci sha' is vague and generic, using non-descriptive terms that don't clearly convey the specific changeset modifications, despite being related to the actual changes. Consider a more descriptive title like 'Replace pr_ref with pr_sha in CI workflows' to clearly indicate the main purpose of the changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-ci-sha

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 756a401 and 0bac1bb.

📒 Files selected for processing (3)
  • .github/workflows/README.md (2 hunks)
  • .github/workflows/gem5-perf-template.yml (4 hunks)
  • .github/workflows/on-demand-spec.yml (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run SPEC Test / XS-GEM5 - Run performance test (spec06-0.8c)
  • GitHub Check: Quick Build, Unit Tests & Smoke Test
🔇 Additional comments (8)
.github/workflows/gem5-perf-template.yml (4)

22-25: Parameter naming is clear and purpose is well-documented. The input parameter correctly specifies that a commit SHA is required (not a branch ref), and the "takes precedence" note clearly communicates behavior to callers.


34-34: Checkout ref logic is sound. Correctly uses inputs.pr_sha when provided and falls back to github.sha otherwise, ensuring the correct commit is always checked out. Based on GitHub Actions semantics, this handles both workflow_dispatch (where pr_sha is explicitly passed) and event-driven triggers (where it falls back to the default SHA).


219-223: Archive output summary looks good. Correctly appends archive path and size to the step summary, providing useful context for CI logs and making the archive location discoverable. The formatting is consistent and properly uses multi-line append with braces.


233-240: Fallback storage step is appropriate. The design correctly uses if: always() to ensure the fallback to shared storage occurs even if the artifact upload fails. The confirmation message is useful for CI logs and helps users understand where to find artifacts if the upload was unsuccessful.

.github/workflows/on-demand-spec.yml (3)

40-40: Output parameter naming is clear. Changed from pr_ref to pr_sha to accurately reflect that the output contains a commit SHA rather than a branch reference name.


48-79: SHA extraction logic is correct. Both event triggers properly extract the PR's HEAD commit SHA: workflow_dispatch fetches it via the REST API, while the label-triggered path uses the event payload. Using github.event.pull_request.head.sha is the correct way to get the SHA of the most recent commit of a pull request, ensuring the template receives the actual commit SHA rather than a branch reference.


85-89: Template parameter passing is correct. The pr_sha output from the trigger job is properly passed to the gem5-perf-template.yml as the pr_sha input, establishing a clear contract between workflows.

.github/workflows/README.md (1)

58-61: New "当前实现" section clearly explains the updated trigger mechanism. Correctly documents that perf labels trigger the default spec06-0.8c benchmark and manual workflows enable other benchmark selections, with emphasis on head SHA tracking for result accuracy. This aligns well with the workflow implementation changes.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

🚀 Coremark Smoke Test Results

Branch IPC Change
Base (xs-dev) 1.9489 -
This PR 1.9489 ➡️ 0.0000 (0.00%)

✅ Difftest smoke test passed!

@XiangShanRobot
Copy link
Copy Markdown

[Generated by GEM5 Performance Robot]
commit: 0bac1bb
workflow: On-Demand SPEC Test (Tier 1.5)

Ideal BTB Performance

Overall Score

PR Master Diff(%)
Score 20.20 17.40 +16.08 🟢

@jensen-yan jensen-yan merged commit 75b8b01 into xs-dev Nov 27, 2025
4 checks passed
@jensen-yan jensen-yan deleted the fix-ci-sha branch November 27, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants