Skip to content

ci: skip cargo-hack feature checks on PRs (keep on merge queue)#11

Open
huth-stacks wants to merge 1 commit into
developfrom
ci/P10-cargo-hack-pr-skip
Open

ci: skip cargo-hack feature checks on PRs (keep on merge queue)#11
huth-stacks wants to merge 1 commit into
developfrom
ci/P10-cargo-hack-pr-skip

Conversation

@huth-stacks

Copy link
Copy Markdown
Owner

What

Skip the cargo-hack feature combination check on PRs. Keep it on merge queue, releases, and manual dispatch.

Why

cargo hack check --all --each-feature takes 13 minutes per PR, checking every feature combination across all 13 workspace crates for Windows and Linux targets. This is valuable for catching feature flag incompatibilities, but:

  • Feature-only breakages are rare (most PRs change code, not features)
  • The merge queue still runs cargo-hack, catching issues before code reaches develop
  • clippy already runs on PRs and catches compilation issues

The Change

In .github/workflows/ci.yml, remove github.event_name == 'pull_request' from cargo-hack-check's condition:

-      github.event_name == 'pull_request' ||

1 line removed from 1 file.

After this change, cargo-hack runs on:

  • Merge queue entries
  • Release branches
  • Manual dispatch
  • Pull requests (skipped for speed)

Metrics to Track

Metric Baseline Expected
cargo-hack native-targets 13m14s Skipped (0s)
cargo-hack WASM targets 1m53s Skipped (0s)
cargo-hack fuzz targets 1m27s Skipped (0s)

Security Checklist

  • No new permissions
  • No secrets exposure
  • Merge queue still validates feature combinations before merge

Part of CI Optimization Series

PR 10. Expected impact: ~13 minutes off every PR run.

Remove pull_request from cargo-hack-check's trigger condition.
Feature combination checks still run on merge queue, releases,
and manual dispatch — catching issues before they reach develop.
PRs skip this 13-minute job for faster feedback.
@huth-stacks huth-stacks added the no changelog Skip changelog fragment check label Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog Skip changelog fragment check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant