@@ -25,7 +25,19 @@ concurrency:
2525permissions : {}
2626
2727jobs :
28+ # Emits is-full-run='true' for workflow_dispatch / ciflow tag /
29+ # sampled-push commits (every 4th main/release commit by depth).
30+ # Returns 'false' for pull_request events — PR jobs use the workflow-
31+ # level `paths:` filter (above) for path-based gating instead.
32+ run-decision :
33+ name : CI run decision
34+ uses : ./.github/workflows/_ci-run-decision.yml
35+
2836 test-mlx :
37+ needs : run-decision
38+ if : |
39+ github.event_name == 'pull_request' ||
40+ needs.run-decision.outputs.is-full-run == 'true'
2941 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
3042 with :
3143 default-packages : " "
@@ -93,6 +105,10 @@ jobs:
93105 echo "::endgroup::"
94106
95107 test-mlx-qwen35-moe :
108+ needs : run-decision
109+ if : |
110+ github.event_name == 'pull_request' ||
111+ needs.run-decision.outputs.is-full-run == 'true'
96112 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
97113 with :
98114 default-packages : " "
@@ -145,6 +161,10 @@ jobs:
145161 echo "::endgroup::"
146162
147163 backend-tester :
164+ needs : run-decision
165+ if : |
166+ github.event_name == 'pull_request' ||
167+ needs.run-decision.outputs.is-full-run == 'true'
148168 strategy :
149169 fail-fast : false
150170 matrix :
@@ -191,6 +211,10 @@ jobs:
191211 fi
192212
193213 test-mlx-parakeet :
214+ needs : run-decision
215+ if : |
216+ github.event_name == 'pull_request' ||
217+ needs.run-decision.outputs.is-full-run == 'true'
194218 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
195219 with :
196220 default-packages : " "
@@ -248,7 +272,10 @@ jobs:
248272 # Requires HuggingFace secrets — skip on fork PRs.
249273 # Maintainers can opt-in by applying the ciflow/mlx label, which
250274 # pushes a ciflow/mlx/<PR> tag that re-runs this workflow with secrets.
251- if : github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
275+ needs : run-decision
276+ if : |
277+ (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') &&
278+ (github.event_name == 'pull_request' || needs.run-decision.outputs.is-full-run == 'true')
252279 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
253280 secrets : inherit
254281 with :
@@ -309,7 +336,10 @@ jobs:
309336 test-mlx-voxtral-realtime :
310337 # Requires HuggingFace secrets — skip on fork PRs.
311338 # Maintainers can opt-in by applying the ciflow/mlx label.
312- if : github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
339+ needs : run-decision
340+ if : |
341+ (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') &&
342+ (github.event_name == 'pull_request' || needs.run-decision.outputs.is-full-run == 'true')
313343 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
314344 secrets : inherit
315345 with :
@@ -387,7 +417,10 @@ jobs:
387417 test-mlx-whisper :
388418 # Requires HuggingFace secrets — skip on fork PRs.
389419 # Maintainers can opt-in by applying the ciflow/mlx label.
390- if : github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
420+ needs : run-decision
421+ if : |
422+ (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') &&
423+ (github.event_name == 'pull_request' || needs.run-decision.outputs.is-full-run == 'true')
391424 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
392425 secrets : inherit
393426 with :
@@ -439,6 +472,10 @@ jobs:
439472
440473
441474 test-mlx-stories110m :
475+ needs : run-decision
476+ if : |
477+ github.event_name == 'pull_request' ||
478+ needs.run-decision.outputs.is-full-run == 'true'
442479 uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
443480 with :
444481 default-packages : " "
@@ -505,7 +542,10 @@ jobs:
505542 test-mlx-llm :
506543 # Requires HuggingFace secrets — skip on fork PRs.
507544 # Maintainers can opt-in by applying the ciflow/mlx label.
508- if : github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
545+ needs : run-decision
546+ if : |
547+ (github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request') &&
548+ (github.event_name == 'pull_request' || needs.run-decision.outputs.is-full-run == 'true')
509549 strategy :
510550 fail-fast : false
511551 matrix :
0 commit comments