[CI] Scope PR builds to changed tasks only if applicable#781
Conversation
Run build for one student task only in 'pull_request' scope. All tests are being run on push event
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5af68d5e20
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| def _task_from_path(path: str, tasks_root: Path) -> str | None: | ||
| parts = PurePosixPath(path).parts | ||
| if len(parts) < 3 or parts[0] != "tasks" or parts[1] == "common": |
There was a problem hiding this comment.
Avoid scoping
.clang-tidy changes to one task
When a PR changes a task-local config such as tasks/example_threads/tests/.clang-tidy, this accepts it as task-scoped and the static-analysis workflow configures CMake with only that task. However the existing clang-tidy action treats any .clang-tidy change as a request to analyze all source files (.github/actions/clang-tidy-native/action.yml lines 35-43), so files from other tasks will not have entries in the scoped compile_commands.json and clang-tidy can fail or run with incorrect fallback flags. Please force the full suite for .clang-tidy changes, or make the analysis file list use the same task scope.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #781 +/- ##
=======================================
Coverage 93.13% 93.13%
=======================================
Files 15 15
Lines 495 495
Branches 185 185
=======================================
Hits 461 461
Misses 1 1
Partials 33 33 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| packages: read | ||
|
|
||
| jobs: | ||
| ci-scope: |
There was a problem hiding this comment.
static-analysis-pr.yml now depends on scripts/detect_ci_task_scope.py to decide the PPC_TASKS value used by the clang-tidy jobs, but that script is not listed in on.pull_request.paths. A PR that changes only this detector would skip the Static analysis workflow entirely, so regressions in CI scoping would not be validated. Please add scripts/detect_ci_task_scope.py to the workflow path filters.
Run build for one student task only in 'pull_request' scope. All tests are being run on push event