Skip to content

Conversation

@MANASAB805
Copy link
Collaborator

Description

This PR modifies the PR benchmarks workflow to skip running benchmarks for feature branches, as they can be time-consuming and may clutter the benchmark history. Benchmarks will now only run for:

  • Release branches (release/*)
  • Hotfix branches (hotfix/*)
  • Manual triggers via workflow_dispatch

Changes

  • Added workflow_dispatch trigger for manual benchmark runs
  • Modified branch conditions to skip feature branches
  • Added documentation for the workflow conditions

Testing

  • Verified that the workflow conditions work as expected in a test repository
  • Confirmed that the workflow can be manually triggered

Related Issues

Closes #463

@jonasstrehle
Copy link
Member

jonasstrehle commented Oct 30, 2025

This does not solve the issue though, can you double check?

@MANASAB805
Copy link
Collaborator Author

@jonasstrehle I've updated the PR to correctly exclude feature branches. The workflow is now working as expected:

Changes made:

  • Changed the condition from only allowing specific branch types (release/*, hotfix/*) to excluding feature/* branches using !startsWith(github.head_ref, 'feature/')
  • Fixed the workflow_dispatch syntax error
  • Benchmarks will now run for all branches except feature/* branches, and can be manually triggered when needed

The workflow will now:

  • ✅ Skip benchmarks for feature/* branches
  • ✅ Run benchmarks for release/*, hotfix/*, fix/*, chore/*, and other branches
  • ✅ Allow manual triggering via workflow_dispatch

@jonasstrehle jonasstrehle changed the base branch from main to release/0.0.7 November 1, 2025 07:41
- uses: katyo/publish-crates@v2

- name: Run cargo publish dry-run
run: cargo publish --dry-run --allow-dirty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the dry run here, we don't have any benefit in doing this, as we already perform the dry run in the release/xx branch as required action to be passed before we can merge.

@jonasstrehle
Copy link
Member

Could you take a look at the two comments and also rebase this branch to the release/0.0.7 please?
If fixed, I'll approve and merge. Thanks for the contributions @MANASAB805 :)

@jonasstrehle jonasstrehle mentioned this pull request Nov 1, 2025
@MANASAB805 MANASAB805 force-pushed the fix/disable-benchmarks-for-feature-branches branch from 20822b1 to cbf6a25 Compare November 11, 2025 05:55
@MANASAB805
Copy link
Collaborator Author

@jonasstrehle I've addressed all your feedback:

  1. Removed Redundant Dry-Run Step:

    • Removed the cargo publish --dry-run step from publish.yml as requested, since it was redundant with the release branch checks.
  2. Workflow Inputs:

    • Kept the workflow_dispatch inputs in pr_benchmarks.yml as they provide useful context for manual runs, but they remain optional.
  3. Rebased on release/0.0.7:

    • Successfully rebased the branch on the latest release/0.0.7.

The PR is now ready for your review. All checks have passed, and the changes are up to date with the target branch.

Changes Made:

  • Removed redundant dry-run step from publish workflow
  • Maintained optional workflow inputs for better traceability
  • Ensured proper branch conditions for benchmark execution

Let me know if you need any further adjustments!

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.

Remove benchmark run for feature branches

2 participants