Skip to content

Conversation

@hodgesds
Copy link
Contributor

  • Add change detection logic to list-integration-tests.py
  • Build dependency graph from Cargo metadata
  • Filter test matrix to only affected schedulers
  • Test all schedulers when core files or libraries change
  • Add local testing script and documentation

This reduces CI time for PRs that only touch specific schedulers.

Technical changes:

  • Added get_changed_files() to detect file changes in PR context
  • Added should_test_all_schedulers() to categorize changes
  • Added build_scheduler_dependency_map() to track Cargo dependencies
  • Added get_affected_schedulers() to determine which schedulers to test
  • Modified main() to filter the scheduler list based on changes
  • Preserved backward compatibility: non-PR contexts test everything

Examples:

  • PR changing only scx_chaos: tests 1 scheduler (85-90% CI time saved)
  • PR changing scx_utils: tests all schedulers (conservative)
  • PR changing scx_rustland_core: tests scx_rustland and scx_rlfifo only

- Add change detection logic to list-integration-tests.py
- Build dependency graph from Cargo metadata
- Filter test matrix to only affected schedulers
- Test all schedulers when core files or libraries change
- Add local testing script and documentation

This reduces CI time for PRs that only touch specific schedulers.

Technical changes:
- Added get_changed_files() to detect file changes in PR context
- Added should_test_all_schedulers() to categorize changes
- Added build_scheduler_dependency_map() to track Cargo dependencies
- Added get_affected_schedulers() to determine which schedulers to test
- Modified main() to filter the scheduler list based on changes
- Preserved backward compatibility: non-PR contexts test everything

Examples:
- PR changing only scx_chaos: tests 1 scheduler (85-90% CI time saved)
- PR changing scx_utils: tests all schedulers (conservative)
- PR changing scx_rustland_core: tests scx_rustland and scx_rlfifo only
@hodgesds hodgesds requested a review from JakeHillion October 27, 2025 19:48
@hodgesds
Copy link
Contributor Author

Not sure how to test this besides landing really, but this should significantly speed up CI.

@hodgesds hodgesds marked this pull request as ready for review October 28, 2025 03:55
Comment on lines +177 to +192
core_patterns = [
"rust/scx_utils/",
"rust/scx_stats/",
"rust/scx_cargo/",
"rust/scx_arena/",
"rust/scx_userspace_arena/",
"rust/scx_bpf_compat/",
"rust/scx_raw_pmu/",
"scheds/include/",
".github/",
".nix/",
"Cargo.toml", # Root workspace Cargo.toml
"Cargo.lock",
"meson.build",
"kernel-versions.json",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think we could invert this? I wonder whether it would be better to say that changes in scheds/rust don't necessarily run everything, but every other change does. This list scares me a bit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants